Fix flake8 warnings

No idea why these are acting up only now.
pull/1518/head
fmdkdd 2018-10-25 13:51:20 +02:00
parent 0a54ce18a9
commit 1702d2db3d
No known key found for this signature in database
GPG Key ID: 4191AF968EE31163
3 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# -*- mode: conf; -*-
[flake8]
# Ignore all missing docstrings for now, until we have docstrings everywhere
ignore = D100,D101,D102,D103,D105,D401
ignore = D100,D101,D102,D103,D105,D401,W503
exclude = test/resources
inline-quotes = '

View File

@ -153,9 +153,9 @@ class EmacsLispSymbol(ObjectDescription):
symbol = obarray.setdefault(name, {})
if self.cell in symbol:
self.state_machine.reporter.warning(
'duplicate description of %s %s, ' % (self.objtype, name) +
'other instance in ' +
self.env.doc2path(symbol[self.cell].docname),
'duplicate description of %s %s, ' % (self.objtype, name)
+ 'other instance in '
+ self.env.doc2path(symbol[self.cell].docname),
line=self.lineno)
symbol[self.cell] = Cell(self.objtype, self.env.docname)
@ -238,9 +238,9 @@ class EmacsLispKey(ObjectDescription):
symbol = obarray.setdefault(name, {})
if 'function' in symbol:
self.state_machine.reporter.warning(
'duplicate description of %s %s, ' % (self.objtype, name) +
'other instance in ' +
self.env.doc2path(symbol['function'].docname),
'duplicate description of %s %s, ' % (self.objtype, name)
+ 'other instance in '
+ self.env.doc2path(symbol['function'].docname),
line=self.lineno)
symbol['function'] = Cell(self.objtype, self.env.docname)
@ -260,9 +260,9 @@ class EmacsLispKey(ObjectDescription):
keymap = self.env.domaindata['el']['keymap']
if binding in keymap:
self.state_machine.reporter.warning(
'duplicate description of binding %s, ' % binding +
'other instance in ' +
self.env.doc2path(keymap[binding]),
'duplicate description of binding %s, ' % binding
+ 'other instance in '
+ self.env.doc2path(keymap[binding]),
line=self.lineno)
keymap[binding] = self.env.docname

View File

@ -110,8 +110,8 @@ class HTMLXRefDB(object):
url = Template(match.group('substurl')).substitute(
substitutions)
substitutions[match.group('substname')] = url
elif (match.group('manname') and
match.group('mantype') == 'node'):
elif (match.group('manname')
and match.group('mantype') == 'node'):
url = Template(match.group('manurl')).substitute(
substitutions)
manuals[match.group('manname')] = url
@ -137,7 +137,7 @@ def update_htmlxref(app):
try:
app.env.info_htmlxref = HTMLXRefDB.parse(
requests.get(HTMLXRefDB.XREF_URL).text)
except requests.exceptions.ConnectionError as error:
except requests.exceptions.ConnectionError:
app.warn('Failed to load xref DB. '
'Info references will not be resolved')
app.env.info_htmlxref = None