summaryrefslogtreecommitdiff
path: root/poezio/decorators.py
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 /poezio/decorators.py
parentcdae238d763565cbfa372c5131adeb147cf00a52 (diff)
downloadpoezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.gz
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.bz2
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.tar.xz
poezio-3f7e7bd9cace057c348a7a01af7476611bd22c9f.zip
fix: pylint bogus errors
Diffstat (limited to 'poezio/decorators.py')
-rw-r--r--poezio/decorators.py12
1 files changed, 6 insertions, 6 deletions
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)