Use flake8 if available instead of pyflakes
With flake8, we can check for more issues and ignore those who are not real issues. This allowed me to find genuine errors in: - modules/boursorama/pages/account_history.py - modules/ing/pages/login.py - weboob/tools/application/qt/qt.py I left one in weboob/tools/browser/browser.py for the time being. Some PEP8 fixes on other files.
This commit is contained in:
parent
e825a7eac0
commit
541d080c9d
18 changed files with 54 additions and 45 deletions
|
|
@ -22,16 +22,15 @@ try:
|
|||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
try:
|
||||
from simplejson import OrderedDict
|
||||
from simplejson import OrderedDict # NOQA
|
||||
except ImportError:
|
||||
try:
|
||||
from ordereddict import OrderedDict
|
||||
from ordereddict import OrderedDict # NOQA
|
||||
except ImportError:
|
||||
## {{{ http://code.activestate.com/recipes/576693/ (r6)
|
||||
from UserDict import DictMixin
|
||||
|
||||
class OrderedDict(dict, DictMixin):
|
||||
|
||||
class OrderedDict(dict, DictMixin): # NOQA
|
||||
def __init__(self, *args, **kwds):
|
||||
if len(args) > 1:
|
||||
raise TypeError('expected at most 1 arguments, got %d' % len(args))
|
||||
|
|
@ -123,7 +122,7 @@ except ImportError:
|
|||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, OrderedDict):
|
||||
return len(self)==len(other) and self.items() == other.items()
|
||||
return len(self) == len(other) and self.items() == other.items()
|
||||
return dict.__eq__(self, other)
|
||||
|
||||
def __ne__(self, other):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue