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:
+6
-6
@@ -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')
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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',
|
||||
)
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user