smp: fix PairingDelegate.get_number return type

This function can return `None` to indicate a negative reply,
update the type hint accordingly.
This commit is contained in:
Lucas Abel
2023-03-27 14:23:15 -07:00
committed by uael
parent 94ff80563b
commit 8e881fdb18

View File

@@ -522,7 +522,11 @@ class PairingDelegate:
async def compare_numbers(self, number: int, digits: int) -> bool: async def compare_numbers(self, number: int, digits: int) -> bool:
return True 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 return 0
# pylint: disable-next=unused-argument # pylint: disable-next=unused-argument