Skip to content

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

Closed
wants to merge 6 commits into from
Closed

add args types #693

wants to merge 6 commits into from

Conversation

ntsamaaa
Copy link

No description provided.

zxzxwu
zxzxwu previously approved these changes May 14, 2025
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]:
Copy link
Collaborator

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.

@zxzxwu zxzxwu self-requested a review May 14, 2025 11:48
Copy link
Collaborator

@zxzxwu zxzxwu left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they are not.

@zxzxwu zxzxwu self-requested a review May 14, 2025 15:06
@zxzxwu zxzxwu dismissed their stale review May 16, 2025 06:57

New commits

@@ -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
Copy link
Collaborator

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):
Copy link
Collaborator

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,
Copy link
Collaborator

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.

@ntsamaaa ntsamaaa closed this Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants