summaryrefslogtreecommitdiff
path: root/poezio/decorators.py
diff options
context:
space:
mode:
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)