[elbe-devel] [PATCH 19/75] debianize base tui: Fix Pylint
Olivier Dion
dion at linutronix.de
Mon May 25 17:42:12 CEST 2020
49:0: R0205: (useless-object-inheritance)
58:0: R0205: (useless-object-inheritance)
141:4: R1710: (inconsistent-return-statements)
163:0: W0613: (unused-argument)
Signed-off-by: Olivier Dion <dion at linutronix.de>
---
elbepack/debianize/base/tui.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/elbepack/debianize/base/tui.py b/elbepack/debianize/base/tui.py
index e0ca5e26..2174f2b7 100644
--- a/elbepack/debianize/base/tui.py
+++ b/elbepack/debianize/base/tui.py
@@ -45,7 +45,8 @@ def generate_helper_text(hints):
markup.extend((("helper_key", key), " ", (text_palette, text), " "))
return markup
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class TUISignal(object):
QUIT = "on_quit"
CLICK = "on_click"
@@ -54,7 +55,8 @@ class TUISignal(object):
class TUIException(Exception):
pass
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class TUI(object):
palette = [
@@ -141,7 +143,8 @@ class TUI(object):
def unhandled_input(cls, key):
if key in cls.keybind:
cls.keybind[key]()
- return None
+ return True
+ return False
@classmethod
def bind_global(cls, key, callback):
@@ -160,7 +163,7 @@ class TUI(object):
raise ExitMainLoop()
@staticmethod
- def pause(*args):
+ def pause(*_args):
TUI.loop.stop()
os.kill(os.getpid(), signal.SIGSTOP)
TUI.loop.start()
--
2.26.2
More information about the elbe-devel
mailing list