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:
Cédric Krier
2020-03-01 12:33:52 +01:00
parent 95a0116eb7
commit e5a9c3d4d1
3 changed files with 10 additions and 5 deletions
+2
View File
@@ -0,0 +1,2 @@
[flake8]
ignore=E123,E124,E126,E128,W503
+7 -4
View File
@@ -65,7 +65,8 @@ if minor_version % 2:
setup(name=name,
version=version,
description='Tryton module to plan, coordinate and manage marketing campaigns',
description='Tryton module to plan, '
'coordinate and manage marketing campaigns',
long_description=read('README.rst'),
author='Tryton',
author_email='bugs@tryton.org',
@@ -80,8 +81,9 @@ setup(name=name,
keywords='tryton marketing automation',
package_dir={'trytond.modules.marketing_automation': '.'},
packages=(
['trytond.modules.marketing_automation'] +
['trytond.modules.marketing_automation.%s' % p for p in find_packages()]
['trytond.modules.marketing_automation']
+ ['trytond.modules.marketing_automation.%s' % p
for p in find_packages()]
),
package_data={
'trytond.modules.marketing_automation': (info.get('xml', [])
@@ -96,7 +98,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)',
+1 -1
View File
@@ -2,7 +2,7 @@
# this repository contains the full copyright notices and license terms.
try:
from trytond.modules.marketing_automation.tests.test_marketing_automation import suite
from trytond.modules.marketing_automation.tests.test_marketing_automation import suite # noqa: E501
except ImportError:
from .test_marketing_automation import suite