diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-14 15:22:43 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-10-14 17:54:36 +0200 |
| commit | d615578b89f1f10d0f057315a58a29c30f1f8693 (patch) | |
| tree | 42565ffa9f4744f5b4afeb809f8d41d44858043b /wrappers/python/eduvpn_common/event.py | |
| parent | 13d3f167e9d13aef234bcf6f4609d9aa7d61e032 (diff) | |
Python: Annotate more return types
Diffstat (limited to 'wrappers/python/eduvpn_common/event.py')
| -rw-r--r-- | wrappers/python/eduvpn_common/event.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wrappers/python/eduvpn_common/event.py b/wrappers/python/eduvpn_common/event.py index d2ab952..e2bfabb 100644 --- a/wrappers/python/eduvpn_common/event.py +++ b/wrappers/python/eduvpn_common/event.py @@ -22,7 +22,7 @@ def class_state_transition(state: int, state_type: StateType) -> Callable: return wrapper -def convert_data(lib: CDLL, state: int, data: Any): +def convert_data(lib: CDLL, state: int, data: Any) -> None: if not data: return None if state is State.NO_SERVER: @@ -67,7 +67,7 @@ class EventHandler(object): else: self.remove_event(state, state_type, method) - def remove_event(self, state: int, state_type: StateType, func: Callable): + def remove_event(self, state: int, state_type: StateType, func: Callable) -> None: for key, values in self.handlers.copy().items(): if key == (state, state_type): values.remove(func) @@ -76,7 +76,7 @@ class EventHandler(object): else: self.handlers[key] = values - def add_event(self, state: int, state_type: StateType, func: Callable): + def add_event(self, state: int, state_type: StateType, func: Callable) -> None: if (state, state_type) not in self.handlers: self.handlers[(state, state_type)] = [] self.handlers[(state, state_type)].append(func) |
