summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-14 12:26:55 +0100
committermathieui <mathieui@mathieui.net>2021-03-14 12:26:55 +0100
commit3f7e7bd9cace057c348a7a01af7476611bd22c9f (patch)
tree66efd1736eee0bc7701ad46c10644707a0a76ffc
parentcdae238d763565cbfa372c5131adeb147cf00a52 (diff)
downloadpoezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.gz
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.bz2
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.xz
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.zip
fix: pylint bogus errors
-rw-r--r--poezio/core/core.py4
-rw-r--r--poezio/core/tabs.py2
-rw-r--r--poezio/decorators.py12
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)