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/account.py b/account.py index 2243828d97..45af326047 100644 --- a/account.py +++ b/account.py @@ -2,8 +2,6 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import PoolMeta, Pool -__all__ = ['InvoiceLine'] - class InvoiceLine(metaclass=PoolMeta): __name__ = 'account.invoice.line' diff --git a/setup.py b/setup.py index 420de39ae6..4e13bb8ccf 100755 --- a/setup.py +++ b/setup.py @@ -80,8 +80,8 @@ setup(name=name, keywords='tryton stock consignment', package_dir={'trytond.modules.stock_consignment': '.'}, packages=( - ['trytond.modules.stock_consignment'] + - ['trytond.modules.stock_consignment.%s' % p for p in find_packages()] + ['trytond.modules.stock_consignment'] + + ['trytond.modules.stock_consignment.%s' % p for p in find_packages()] ), package_data={ 'trytond.modules.stock_consignment': (info.get('xml', []) @@ -96,7 +96,8 @@ setup(name=name, 'Intended Audience :: Financial and Insurance Industry', 'Intended Audience :: Legal Industry', 'Intended Audience :: Manufacturing', - 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', + 'License :: OSI Approved :: ' + 'GNU General Public License v3 or later (GPLv3+)', 'Natural Language :: Bulgarian', 'Natural Language :: Catalan', 'Natural Language :: Chinese (Simplified)', diff --git a/stock.py b/stock.py index ac961f9395..4e2d7864d4 100644 --- a/stock.py +++ b/stock.py @@ -8,9 +8,6 @@ from trytond.transaction import Transaction from trytond.pool import PoolMeta, Pool from trytond.pyson import Eval -__all__ = ['Location', 'LocationLeadTime', - 'Move', 'ShipmentInternal', 'Inventory', 'OrderPoint'] - class Location(metaclass=PoolMeta): __name__ = 'stock.location' @@ -103,7 +100,8 @@ class Move(metaclass=PoolMeta): and not self.origin and self.from_location and self.to_location - and ((self.from_location.type == 'supplier' + and (( + self.from_location.type == 'supplier' and self.to_location.type in { 'storage', 'production', 'customer'}) or (self.from_location.type in { diff --git a/tests/__init__.py b/tests/__init__.py index db879a288d..1987cb9ab4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,7 +2,7 @@ # this repository contains the full copyright notices and license terms. try: - from trytond.modules.stock_consignment.tests.test_stock_consignment import suite + from trytond.modules.stock_consignment.tests.test_stock_consignment import suite # noqa: E501 except ImportError: from .test_stock_consignment import suite