updates to add type hinting to uses of Callable

This commit is contained in:
Blake Harnden 2020-01-15 11:56:23 -08:00
parent b3118513fa
commit dcabd8d6f8
9 changed files with 22 additions and 18 deletions

View file

@ -1206,7 +1206,7 @@ class Session:
ExceptionLevels.ERROR, "Session.run_state_hooks", None, message
)
def add_state_hook(self, state: int, hook: Callable) -> None:
def add_state_hook(self, state: int, hook: Callable[[int], None]) -> None:
"""
Add a state hook.
@ -1222,7 +1222,7 @@ class Session:
if self.state == state:
hook(state)
def del_state_hook(self, state: int, hook: Callable) -> None:
def del_state_hook(self, state: int, hook: Callable[[int], None]) -> None:
"""
Delete a state hook.