diff options
-rw-r--r-- | poezio/core/core.py | 4 | ||||
-rw-r--r-- | poezio/core/tabs.py | 2 | ||||
-rw-r--r-- | poezio/decorators.py | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py index 732118a4..6372dd3e 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -1048,13 +1048,13 @@ class Core: """ rotate the rooms list to the right """ - self.tabs.next() + self.tabs.next() # pylint: disable=not-callable def rotate_rooms_left(self) -> None: """ rotate the rooms list to the right """ - self.tabs.prev() + self.tabs.prev() # pylint: disable=not-callable def go_to_room_number(self) -> None: """ diff --git a/poezio/core/tabs.py b/poezio/core/tabs.py index a789100d..536d7d62 100644 --- a/poezio/core/tabs.py +++ b/poezio/core/tabs.py @@ -293,7 +293,7 @@ class Tabs: def _validate_current_index(self): if not 0 <= self._current_index < len( self._tabs) or not self.current_tab: - self.prev() + self.prev() # pylint: disable=not-callable def _collect_trailing_gaptabs(self): """Remove trailing gap tabs if any""" diff --git a/poezio/decorators.py b/poezio/decorators.py index 4b5ef1dc..a95e7348 100644 --- a/poezio/decorators.py +++ b/poezio/decorators.py @@ -66,8 +66,8 @@ class RefreshWrapper: returns True """ def after(result: Any, args, kwargs) -> Any: - if self.core and result: - self.core.refresh_window() + if self.core is not None and result: + self.core.refresh_window() # pylint: disable=no-member return result wrap = wrap_generic(func, after=after) @@ -79,8 +79,8 @@ class RefreshWrapper: Decorator that refreshs the UI no matter what after the function """ def after(result: Any, args, kwargs) -> Any: - if self.core: - self.core.refresh_window() + if self.core is not None: + self.core.refresh_window() # pylint: disable=no-member return result wrap = wrap_generic(func, after=after) @@ -92,8 +92,8 @@ class RefreshWrapper: """ def after(result: Any, args, kwargs) -> Any: - if self.core: - self.core.doupdate() + if self.core is not None: + self.core.doupdate() # pylint: disable=no-member return result wrap = wrap_generic(func, after=after) return cast(T, wrap) |