-
Notifications
You must be signed in to change notification settings - Fork 93
add args types #693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add args types #693
Conversation
bumble/a2dp.py
Outdated
@@ -144,7 +144,7 @@ | |||
|
|||
|
|||
# ----------------------------------------------------------------------------- | |||
def flags_to_list(flags: bool, values: list) -> list: | |||
def flags_to_list(flags: bool, values: list[int]) -> list[int]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be removed because it's not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check them carefully before pushing to the PR
@@ -181,7 +181,9 @@ def __init__( | |||
|
|||
if reset_energy_expended: | |||
|
|||
def write_heart_rate_control_point_value(connection, value): | |||
def write_heart_rate_control_point_value( | |||
connection: int, value: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are not.
@@ -181,7 +181,9 @@ def __init__( | |||
|
|||
if reset_energy_expended: | |||
|
|||
def write_heart_rate_control_point_value(connection, value): | |||
def write_heart_rate_control_point_value( | |||
connection: int, value: int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connection: Connection
@@ -87,7 +87,7 @@ def __init__( | |||
self.rr_intervals = rr_intervals | |||
|
|||
@classmethod | |||
def from_bytes(cls, data): | |||
def from_bytes(cls, data: bytes): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return type: HeartRateMeasurement
@@ -63,7 +63,7 @@ class BodySensorLocation(IntEnum): | |||
class HeartRateMeasurement: | |||
def __init__( | |||
self, | |||
heart_rate, | |||
heart_rate: int, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we're adding types, the other parameters and return value should be typed as well.
No description provided.