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 f46eab917c..9543be6581 100644 --- a/__init__.py +++ b/__init__.py @@ -2,14 +2,14 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from .product import * +from . import product def register(): Pool.register( - Template, - Taxon, - Cultivar, - CultivarGroup, - Cultivar_CultivarGroup, + product.Template, + product.Taxon, + product.Cultivar, + product.CultivarGroup, + product.Cultivar_CultivarGroup, module='product_classification_taxonomic', type_='model') diff --git a/product.py b/product.py index e1fcb0c01f..ecd29b686b 100644 --- a/product.py +++ b/product.py @@ -6,9 +6,6 @@ from trytond.pool import PoolMeta from trytond.modules.product_classification.product import ( classification_tree, ClassificationMixin) -__all__ = ['Template', - 'Taxon', 'Cultivar', 'CultivarGroup', 'Cultivar_CultivarGroup'] - class Template(metaclass=PoolMeta): __name__ = 'product.template' diff --git a/setup.py b/setup.py index 3e8719483e..99fe534216 100755 --- a/setup.py +++ b/setup.py @@ -79,8 +79,8 @@ setup(name=name, keywords='tryton product classification taxonomic', package_dir={'trytond.modules.product_classification_taxonomic': '.'}, packages=( - ['trytond.modules.product_classification_taxonomic'] + - ['trytond.modules.product_classification_taxonomic.%s' % p + ['trytond.modules.product_classification_taxonomic'] + + ['trytond.modules.product_classification_taxonomic.%s' % p for p in find_packages()] ), package_data={ @@ -93,7 +93,8 @@ setup(name=name, 'Environment :: Plugins', 'Framework :: Tryton', 'Intended Audience :: Developers', - '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)', @@ -130,7 +131,7 @@ setup(name=name, entry_points=""" [trytond.modules] product_classification_taxonomic = trytond.modules.product_classification_taxonomic - """, + """, # noqa: E501 test_suite='tests', test_loader='trytond.test_loader:Loader', ) diff --git a/tests/__init__.py b/tests/__init__.py index b72140b048..064a3dc5b4 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.product_classification_taxonomic.tests.test_product_classification_taxonomic import suite + from trytond.modules.product_classification_taxonomic.tests.test_product_classification_taxonomic import suite # noqa: E501 except ImportError: from .test_product_classification_taxonomic import suite