diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..bb03d08a82 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +ignore=E123,E124,E126,E128,W503 diff --git a/proteus/__init__.py b/proteus/__init__.py index 6746bf4a3e..d5b5a4693e 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -785,8 +785,8 @@ class Model(object): def __eq__(self, other): if isinstance(other, Model): - return ((self.__class__.__name__, self.id) == - (other.__class__.__name__, other.id)) + return ((self.__class__.__name__, self.id) + == (other.__class__.__name__, other.id)) return NotImplemented def __ne__(self, other): diff --git a/proteus/tests/__init__.py b/proteus/tests/__init__.py index 5f9965f337..a72804f4fd 100644 --- a/proteus/tests/__init__.py +++ b/proteus/tests/__init__.py @@ -10,7 +10,8 @@ import proteus.config os.environ.setdefault('TRYTOND_DATABASE_URI', 'sqlite:///:memory:') os.environ.setdefault('DB_NAME', ':memory:') -from trytond.tests.test_tryton import doctest_setup, doctest_teardown +from trytond.tests.test_tryton import ( + doctest_setup, doctest_teardown) # noqa: E402 here = os.path.dirname(__file__) readme = os.path.normpath(os.path.join(here, '..', '..', 'README')) @@ -46,6 +47,7 @@ def main(): runner = unittest.TextTestRunner() return runner.run(suite) + if __name__ == '__main__': sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.abspath(__file__)))))