fix: pylint bogus errors

This commit is contained in:
mathieui 2021-03-14 12:26:55 +01:00
parent cdae238d76
commit 3f7e7bd9ca
3 changed files with 9 additions and 9 deletions

View file

@ -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:
"""

View file

@ -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"""

View file

@ -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)