-
Notifications
You must be signed in to change notification settings - Fork 302
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
Conversation
557e092
to
28e06b4
Compare
bleak/__init__.py
Outdated
@@ -154,11 +155,16 @@ def __init__( | |||
**kwargs, | |||
) | |||
|
|||
async def __aenter__(self): | |||
async def __aenter__(self) -> "BleakScanner": |
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.
We should be able to drop the quotes since we have from __future__ import annotations
in this file already.
bleak/__init__.py
Outdated
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)) | ||
), |
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.
This looks unrelated. I'm guessing black
did this?
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.
Yes black.
bleak/__init__.py
Outdated
return f"<{self.__class__.__name__}, {self.address}, {type(self._backend)}>" | ||
|
||
# Async Context managers | ||
|
||
async def __aenter__(self): | ||
async def __aenter__(self) -> "BleakClient": |
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.
Can remove the quotes here too.
Merged, thanks! |
No description provided.