summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-03-13 02:35:57 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2020-03-25 17:24:33 +0100
commit645707652b04538be55089086cb46c3ff000283a (patch)
treedb3470b1ae5562ae36b01525fb8f0255b15e24ca
parentb2e6d29c4ce8b380cf988b6007da81b687972402 (diff)
downloadpoezio-645707652b04538be55089086cb46c3ff000283a.tar.gz
poezio-645707652b04538be55089086cb46c3ff000283a.tar.bz2
poezio-645707652b04538be55089086cb46c3ff000283a.tar.xz
poezio-645707652b04538be55089086cb46c3ff000283a.zip
plugins/reorder: satisfy linter
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--plugins/reorder.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/reorder.py b/plugins/reorder.py
index 32fa6639..8d9516f8 100644
--- a/plugins/reorder.py
+++ b/plugins/reorder.py
@@ -117,6 +117,8 @@ def parse_runtime_tablist(tablist):
class Plugin(BasePlugin):
+ """reorder plugin"""
+
def init(self):
self.api.add_command(
'reorder',
@@ -129,20 +131,24 @@ class Plugin(BasePlugin):
help='Save the current tab layout')
@command_args_parser.ignored
- def command_save_order(self):
+ def command_save_order(self) -> None:
+ """
+ /save_order
+ """
conf = parse_runtime_tablist(self.core.tabs)
for key, value in conf:
self.config.set(key, value)
self.api.information('Tab order saved', 'Info')
@command_args_parser.ignored
- def command_reorder(self):
+ def command_reorder(self) -> None:
"""
/reorder
"""
tabs_spec = parse_config(self.config)
if not tabs_spec:
- return self.api.information('Invalid reorder config', 'Error')
+ self.api.information('Invalid reorder config', 'Error')
+ return None
old_tabs = self.core.tabs.get_tabs()
roster = old_tabs.pop(0)
@@ -173,3 +179,5 @@ class Plugin(BasePlugin):
self.core.tabs.replace_tabs(new_tabs)
self.core.refresh_window()
+
+ return None