diff options
author | mathieui <mathieui@mathieui.net> | 2018-08-15 13:24:11 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-08-15 13:24:11 +0200 |
commit | b6e23355f1be8f02ab1e5284e65991382be76dbc (patch) | |
tree | 9cfb9d49eec87ac0ffca7b5d0e15df5a404cf37c | |
parent | 6e13b8b73572f9c0ac9b5c683b98a475afbeab38 (diff) | |
download | poezio-b6e23355f1be8f02ab1e5284e65991382be76dbc.tar.gz poezio-b6e23355f1be8f02ab1e5284e65991382be76dbc.tar.bz2 poezio-b6e23355f1be8f02ab1e5284e65991382be76dbc.tar.xz poezio-b6e23355f1be8f02ab1e5284e65991382be76dbc.zip |
Make pylint happy on plugins
It does not like dynamically defined attributes, unsurprisingly
-rw-r--r-- | plugins/code.py | 2 | ||||
-rw-r--r-- | plugins/mpd_client.py | 6 | ||||
-rw-r--r-- | plugins/otr.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/code.py b/plugins/code.py index 1c0679f2..fa04f758 100644 --- a/plugins/code.py +++ b/plugins/code.py @@ -27,7 +27,7 @@ from poezio.plugin import BasePlugin from pygments import highlight from pygments.lexers import get_lexer_by_name -from pygments.formatters import HtmlFormatter +from pygments.formatters import HtmlFormatter #pylint: disable=no-name-in-module FORMATTER = HtmlFormatter(nowrap=True, noclasses=True) diff --git a/plugins/mpd_client.py b/plugins/mpd_client.py index c5cd88b8..a8893999 100644 --- a/plugins/mpd_client.py +++ b/plugins/mpd_client.py @@ -76,8 +76,8 @@ class Plugin(BasePlugin): port=self.config.get('port', '6600')) password = self.config.get('password', '') if password: - c.password(password) - current = c.currentsong() + c.password(password) #pylint: disable=no-member + current = c.currentsong() #pylint: disable=no-member artist = current.get('artist', 'Unknown artist') album = current.get('album', 'Unknown album') title = current.get('title', base( @@ -86,7 +86,7 @@ class Plugin(BasePlugin): s = '%s - %s (%s)' % (artist, title, album) if 'full' in args: if 'elapsed' in current and 'time' in current: - current_time = float(c.status()['elapsed']) + current_time = float(c.status()['elapsed']) #pylint: disable=no-member percents = int(current_time / float(current['time']) * 10) s += ' \x192}[\x191}' + '-' * ( percents - 1) + '\x193}+' + '\x191}' + '-' * ( diff --git a/plugins/otr.py b/plugins/otr.py index 1e5944a8..9c80f390 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -637,8 +637,8 @@ class Plugin(BasePlugin): return except ErrorReceived as err: # Received an OTR error - format_dict['err'] = err.args[0].error.decode( - 'utf-8', errors='replace') + proto_error = err.args[0].error # pylint: disable=no-member + format_dict['err'] = proto_error.decode('utf-8', errors='replace') tab.add_message(OTR_ERROR % format_dict, typ=0) del msg['body'] del msg['html'] |