Fix lint
This commit is contained in:
parent
f5ecba0d07
commit
d1ddc8c6cb
3
.flake8
3
.flake8
@ -12,6 +12,7 @@
|
||||
# F811: Redifiniton
|
||||
# W292: No newline at end of file
|
||||
# E702: multiple statements on one line
|
||||
ignore=E241,E265,F401,E501,F821,F841,E222,F811,W292,E702
|
||||
# E225: missing whitespace around operator
|
||||
ignore=E241,E265,F401,E501,F821,F841,E222,F811,W292,E702,E225
|
||||
max_complexity = 12
|
||||
exclude = ez_setup.py
|
||||
|
@ -53,4 +53,4 @@ defining-attr-methods=__init__,__new__,setUp
|
||||
max-args=10
|
||||
|
||||
[TYPECHECK]
|
||||
ignored-classes=WebElementWrapper
|
||||
ignored-classes=WebElementWrapper,AnsiCodes
|
||||
|
@ -753,6 +753,8 @@ class CommandDispatcher:
|
||||
@cmdutils.register(instance='mainwindow.tabs.cmd')
|
||||
def view_source(self):
|
||||
"""Show the source of the current page."""
|
||||
# pylint doesn't seem to like pygments...
|
||||
# pylint: disable=no-member
|
||||
widget = self._current_widget()
|
||||
if widget.viewing_source:
|
||||
raise cmdexc.CommandError("Already viewing source!")
|
||||
|
@ -128,7 +128,7 @@ class ConfigManager(QObject):
|
||||
for sectname in self.sections.keys():
|
||||
self._proxies[sectname] = SectionProxy(self, sectname)
|
||||
self._from_cp(self._configparser)
|
||||
self._initialized=True
|
||||
self._initialized = True
|
||||
|
||||
def __getitem__(self, key):
|
||||
"""Get a section from the config."""
|
||||
@ -249,8 +249,8 @@ class ConfigManager(QObject):
|
||||
if '${' + changed_opt + '}' in option.value():
|
||||
self._emit_changed(changed_sect, optname)
|
||||
# Options in any section and ${sectname:optname} interpolation.
|
||||
for sectname, section in self.sections.items():
|
||||
for optname, option in section.items():
|
||||
for sectname, sect in self.sections.items():
|
||||
for optname, option in sect.items():
|
||||
if ('${' + changed_sect + ':' + changed_opt + '}' in
|
||||
option.value()):
|
||||
self._emit_changed(sectname, optname)
|
||||
|
@ -122,7 +122,8 @@ def _module_versions():
|
||||
Return:
|
||||
A list of lines with version info.
|
||||
"""
|
||||
# pylint: disable=import-error,unused-variable
|
||||
# We should find a way to rewrite this using __import__ or so.
|
||||
# pylint: disable=import-error,unused-variable,too-many-branches
|
||||
lines = []
|
||||
try:
|
||||
import sipconfig
|
||||
|
Loading…
Reference in New Issue
Block a user