From 39394144bd5db6bf79759f40fa978942bc65c3d3 Mon Sep 17 00:00:00 2001 From: Andrew Dunai Date: Thu, 9 Aug 2018 14:39:02 +0300 Subject: [PATCH] pylint, oh please. --- .pylintrc | 13 +++++++------ clay/pages/debug.py | 1 - clay/pages/myplaylists.py | 1 - clay/pages/mystations.py | 1 - clay/pages/search.py | 2 -- clay/pages/settings.py | 4 ---- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.pylintrc b/.pylintrc index db2c6c0..500a47b 100644 --- a/.pylintrc +++ b/.pylintrc @@ -4,12 +4,13 @@ max-args = 8 [messages control] disable = - duplicate-code, - too-few-public-methods, - too-many-public-methods, - too-many-instance-attributes, - no-self-use, - too-many-ancestors + duplicate-code, # Meh. + too-few-public-methods, # Namespaces are great. (c) + too-many-public-methods, # Namespaces are really great! + too-many-instance-attributes, # Ditto. + no-self-use, # Makes code less readable. + too-many-ancestors, # Mixins FTW. + useless-object-inheritance # Silly pylint, you forgot Python 2.x! [miscellaneous] diff --git a/clay/pages/debug.py b/clay/pages/debug.py index 6b643bc..a8522d0 100644 --- a/clay/pages/debug.py +++ b/clay/pages/debug.py @@ -42,7 +42,6 @@ class DebugItem(urwid.AttrMap): def copy_message(self): """Copy the selected error message to the clipboard""" copy(self.log_record.formatted_message) - return None class DebugPage(urwid.Pile, AbstractPage): diff --git a/clay/pages/myplaylists.py b/clay/pages/myplaylists.py index 2465fa3..c22f84e 100644 --- a/clay/pages/myplaylists.py +++ b/clay/pages/myplaylists.py @@ -42,7 +42,6 @@ class MyPlaylistListItem(urwid.Columns): Start playing the selected playlist """ urwid.emit_signal(self, 'activate', self) - return None def get_tracks(self): """ diff --git a/clay/pages/mystations.py b/clay/pages/mystations.py index b9b9e48..26b4056 100644 --- a/clay/pages/mystations.py +++ b/clay/pages/mystations.py @@ -41,7 +41,6 @@ class MyStationListItem(urwid.Columns): Start playing the selected station """ urwid.emit_signal(self, 'activate', self) - return None class MyStationListBox(urwid.ListBox): diff --git a/clay/pages/search.py b/clay/pages/search.py index d5ff980..39a3b12 100644 --- a/clay/pages/search.py +++ b/clay/pages/search.py @@ -43,7 +43,6 @@ class SearchBox(urwid.Columns): Send a message to urwid to search the filled in search query """ urwid.emit_signal(self, 'search-requested', self.query.edit_text) - return None class SearchPage(urwid.Pile, AbstractPage): @@ -109,6 +108,5 @@ class SearchPage(urwid.Pile, AbstractPage): self.focus_position = 2 else: self.focus_position = 0 - return None else: return super(SearchPage, self).keypress(size, key) diff --git a/clay/pages/settings.py b/clay/pages/settings.py index 62f1d53..4e5d08d 100644 --- a/clay/pages/settings.py +++ b/clay/pages/settings.py @@ -91,8 +91,6 @@ class Slider(urwid.Widget): self.value += 1 self.update() - return None - def equalizer_down(self): """ Turn the equalizer band down @@ -101,8 +99,6 @@ class Slider(urwid.Widget): self.value -= 1 self.update() - return None - def update(self): """ Update player equalizer & toggle redraw.