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/__init__.py b/__init__.py index 915f5a13a9..63c6c0dc4a 100644 --- a/__init__.py +++ b/__init__.py @@ -3,7 +3,7 @@ from trytond.pool import Pool from . import account -from .invoice import * +from . import invoice from . import party @@ -11,12 +11,12 @@ def register(): Pool.register( account.AccountTypeTemplate, account.AccountType, - Invoice, - InvoiceLine, - DepositRecallStart, + invoice.Invoice, + invoice.InvoiceLine, + invoice.DepositRecallStart, party.Party, module='account_deposit', type_='model') Pool.register( - DepositRecall, - party.PartyErase, + invoice.DepositRecall, + party.Erase, module='account_deposit', type_='wizard') diff --git a/invoice.py b/invoice.py index 59e9178782..89d2aebe59 100644 --- a/invoice.py +++ b/invoice.py @@ -9,9 +9,6 @@ from trytond.transaction import Transaction from .exceptions import DepositError -__all__ = ['Invoice', 'InvoiceLine', - 'DepositRecall', 'DepositRecallStart'] - class Invoice(metaclass=PoolMeta): __name__ = 'account.invoice' diff --git a/party.py b/party.py index bf96a5f177..67e7c46a0c 100644 --- a/party.py +++ b/party.py @@ -16,9 +16,6 @@ from trytond.tools import grouped_slice, reduce_ids from trytond.modules.party.exceptions import EraseError -__all__ = ['Party', 'PartyErase'] - - class Party(metaclass=PoolMeta): __name__ = 'party.party' @@ -142,7 +139,7 @@ class Party(metaclass=PoolMeta): return not amount or ((amount < 0) == (sign < 0)) -class PartyErase(metaclass=PoolMeta): +class Erase(metaclass=PoolMeta): __name__ = 'party.erase' def check_erase_company(self, party, company): diff --git a/setup.py b/setup.py index 9c95bc0070..d0c16c79ee 100755 --- a/setup.py +++ b/setup.py @@ -79,8 +79,8 @@ setup(name=name, keywords='tryton account deposit', package_dir={'trytond.modules.account_deposit': '.'}, packages=( - ['trytond.modules.account_deposit'] + - ['trytond.modules.account_deposit.%s' % p for p in find_packages()] + ['trytond.modules.account_deposit'] + + ['trytond.modules.account_deposit.%s' % p for p in find_packages()] ), package_data={ 'trytond.modules.account_deposit': (info.get('xml', []) @@ -94,7 +94,8 @@ setup(name=name, 'Intended Audience :: Developers', 'Intended Audience :: Financial and Insurance Industry', 'Intended Audience :: Legal Industry', - '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/tests/__init__.py b/tests/__init__.py index f2feba24e5..cf4b47f7d8 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.account_deposit.tests.test_account_deposit import suite + from trytond.modules.account_deposit.tests.test_account_deposit import suite # noqa: E501 except ImportError: from .test_account_deposit import suite