Skip to content

Commit

Permalink
Merge pull request #161 from google/uael/smp-get-number-type-hint
Browse files Browse the repository at this point in the history
smp: fix `PairingDelegate.get_number` return type
  • Loading branch information
uael committed Mar 28, 2023
2 parents fb68fa6 + 8e881fd commit 044597d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bumble/smp.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,11 @@ async def confirm(self) -> bool:
async def compare_numbers(self, number: int, digits: int) -> bool:
return True

async def get_number(self) -> int:
async def get_number(self) -> Optional[int]:
'''
Returns an optional number as an answer to a passkey request.
Returning `None` will result in a negative reply.
'''
return 0

async def get_string(self, max_length) -> Optional[str]:
Expand Down

0 comments on commit 044597d

Please sign in to comment.