Skip to content

Commit

Permalink
BleakScanner.discover: fix type hints when return_adv=True
Browse files Browse the repository at this point in the history
Pyright/Pylance needs the default value supplied in order to correctly
match the overload.
  • Loading branch information
dlech committed Feb 19, 2023
1 parent 1d59e1b commit cd6b3d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bleak/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ async def discover(
@overload
@classmethod
async def discover(
cls, timeout: float = 5.0, *, return_adv: Literal[True], **kwargs
cls, timeout: float = 5.0, *, return_adv: Literal[True] = True, **kwargs
) -> Dict[str, Tuple[BLEDevice, AdvertisementData]]:
...

Expand Down

0 comments on commit cd6b3d9

Please sign in to comment.