Make pylint happy on plugins
It does not like dynamically defined attributes, unsurprisingly
This commit is contained in:
parent
6e13b8b735
commit
b6e23355f1
3 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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}' + '-' * (
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue