Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same. We remove the usage of __all__ for non public API. When possible, we rationalize the class name according to its __name__ and module. issue9082 review297061002
This commit is contained in:
1 parent
f81b2e3fe9
commit
9cdcfdb2d6
3 files changed
+7
-3
No files matched your search
+2
-2
@@ -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):
|
||||
|
||||
@@ -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__)))))
|
||||
|
||||
Reference in new issue
Block a user