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 583b4cc075..e0bd2096e8 100644 --- a/__init__.py +++ b/__init__.py @@ -29,8 +29,8 @@ def register(): Pool.register( subscription.CreateLineConsumption, subscription.CreateSubscriptionInvoice, - party.PartyReplace, - party.PartyErase, + party.Replace, + party.Erase, module='sale_subscription', type_='wizard') Pool.register( module='sale_subscription', type_='report') diff --git a/configuration.py b/configuration.py index a0c7f6dc48..547d3d9176 100644 --- a/configuration.py +++ b/configuration.py @@ -4,8 +4,6 @@ from trytond.model import fields from trytond.pool import PoolMeta, Pool from trytond.pyson import Eval -__all__ = ['Configuration', 'ConfigurationSequence'] - class Configuration(metaclass=PoolMeta): __name__ = 'sale.configuration' diff --git a/invoice.py b/invoice.py index e72189cf43..6b3958c22b 100644 --- a/invoice.py +++ b/invoice.py @@ -2,8 +2,6 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool, PoolMeta -__all__ = ['InvoiceLine'] - class InvoiceLine(metaclass=PoolMeta): __name__ = 'account.invoice.line' diff --git a/party.py b/party.py index 9502b192e7..ee7438d417 100644 --- a/party.py +++ b/party.py @@ -5,26 +5,24 @@ from trytond.pool import PoolMeta, Pool from trytond.modules.party.exceptions import EraseError -__all__ = ['PartyReplace', 'PartyErase'] - -class PartyReplace(metaclass=PoolMeta): +class Replace(metaclass=PoolMeta): __name__ = 'party.replace' @classmethod def fields_to_replace(cls): - return super(PartyReplace, cls).fields_to_replace() + [ + return super().fields_to_replace() + [ ('sale.subscription', 'party'), ] -class PartyErase(metaclass=PoolMeta): +class Erase(metaclass=PoolMeta): __name__ = 'party.erase' def check_erase_company(self, party, company): pool = Pool() Subscription = pool.get('sale.subscription') - super(PartyErase, self).check_erase_company(party, company) + super().check_erase_company(party, company) subscriptions = Subscription.search([ ('party', '=', party.id), diff --git a/recurrence.py b/recurrence.py index f5b2e011b4..a735ec6fd9 100644 --- a/recurrence.py +++ b/recurrence.py @@ -11,7 +11,6 @@ from trytond.transaction import Transaction from .exceptions import RecurrenceRuleValidationError -__all__ = ['RecurrenceRuleSet', 'RecurrenceRule'] WEEKDAYS = { 'MO': MO, 'TU': TU, diff --git a/service.py b/service.py index 93e8a47e36..06f14b322c 100644 --- a/service.py +++ b/service.py @@ -3,8 +3,6 @@ from trytond.model import ModelSQL, ModelView, DeactivableMixin, fields from trytond.pyson import Eval -__all__ = ['Service'] - class Service(DeactivableMixin, ModelSQL, ModelView): "Subscription Service" diff --git a/setup.py b/setup.py index 35b1c7bd09..9a82526af8 100755 --- a/setup.py +++ b/setup.py @@ -79,8 +79,8 @@ setup(name=name, keywords='tryton sale subscription', package_dir={'trytond.modules.sale_subscription': '.'}, packages=( - ['trytond.modules.sale_subscription'] + - ['trytond.modules.sale_subscription.%s' % p for p in find_packages()] + ['trytond.modules.sale_subscription'] + + ['trytond.modules.sale_subscription.%s' % p for p in find_packages()] ), package_data={ 'trytond.modules.sale_subscription': (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)',