Skip to content
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

Partial typehints for bleak/__init__.py #1512

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Conversation

Siecje
Copy link
Contributor

@Siecje Siecje commented Feb 14, 2024

No description provided.

@Siecje Siecje force-pushed the typehints_1 branch 3 times, most recently from 557e092 to 28e06b4 Compare February 14, 2024 16:26
@@ -154,11 +155,16 @@ def __init__(
**kwargs,
)

async def __aenter__(self):
async def __aenter__(self) -> "BleakScanner":
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should be able to drop the quotes since we have from __future__ import annotations in this file already.

Comment on lines 529 to 536
disconnected_callback=(
None
if disconnected_callback is None
else functools.partial(disconnected_callback, self)
),
services=(
None if services is None else set(map(normalize_uuid_str, services))
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks unrelated. I'm guessing black did this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes black.

return f"<{self.__class__.__name__}, {self.address}, {type(self._backend)}>"

# Async Context managers

async def __aenter__(self):
async def __aenter__(self) -> "BleakClient":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can remove the quotes here too.

@dlech dlech merged commit 48b1963 into hbldh:develop Feb 14, 2024
13 checks passed
@dlech
Copy link
Collaborator

dlech commented Feb 14, 2024

Merged, thanks!

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.

2 participants