changeset 48ef814b87b6 in modules/account_payment_sepa:default
details:
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=48ef814b87b6
description:
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
diffstat:
.flake8 | 2 ++
account.py | 2 --
payment.py | 3 ++-
setup.py | 7 ++++---
tests/__init__.py | 2 +-
5 files changed, 9 insertions(+), 7 deletions(-)
diffs (67 lines):
diff -r 0c9b752eb400 -r 48ef814b87b6 .flake8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.flake8 Sun Mar 01 12:33:51 2020 +0100
@@ -0,0 +1,2 @@
+[flake8]
+ignore=E123,E124,E126,E128,W503
diff -r 0c9b752eb400 -r 48ef814b87b6 account.py
--- a/account.py Mon Feb 17 11:42:55 2020 +0100
+++ b/account.py Sun Mar 01 12:33:51 2020 +0100
@@ -7,8 +7,6 @@
from trytond.tools.multivalue import migrate_property
from trytond.modules.company.model import CompanyValueMixin
-__all__ = ['Configuration', 'ConfigurationSepaMandateSequence']
-
class Configuration(metaclass=PoolMeta):
__name__ = 'account.configuration'
diff -r 0c9b752eb400 -r 48ef814b87b6 payment.py
--- a/payment.py Mon Feb 17 11:42:55 2020 +0100
+++ b/payment.py Sun Mar 01 12:33:51 2020 +0100
@@ -748,7 +748,8 @@
cursor.execute(*table.insert(
[table.message, table.type, table.company,
table.origin, table.state],
- [[message, 'out', company_id,
+ [[
+ message, 'out', company_id,
'account.payment.group,%s' % group_id,
'done']]))
group_table.drop_column('sepa_message')
diff -r 0c9b752eb400 -r 48ef814b87b6 setup.py
--- a/setup.py Mon Feb 17 11:42:55 2020 +0100
+++ b/setup.py Sun Mar 01 12:33:51 2020 +0100
@@ -80,8 +80,8 @@
keywords='tryton account payment SEPA',
package_dir={'trytond.modules.account_payment_sepa': '.'},
packages=(
- ['trytond.modules.account_payment_sepa'] +
- ['trytond.modules.account_payment_sepa.%s' % p
+ ['trytond.modules.account_payment_sepa']
+ + ['trytond.modules.account_payment_sepa.%s' % p
for p in find_packages()]
),
package_data={
@@ -97,7 +97,8 @@
'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 -r 0c9b752eb400 -r 48ef814b87b6 tests/__init__.py
--- a/tests/__init__.py Mon Feb 17 11:42:55 2020 +0100
+++ b/tests/__init__.py Sun Mar 01 12:33:51 2020 +0100
@@ -2,7 +2,7 @@
# this repository contains the full copyright notices and license terms.
try:
- from trytond.modules.account_payment_sepa.tests.test_account_payment_sepa
import (
+ from trytond.modules.account_payment_sepa.tests.test_account_payment_sepa
import ( # noqa: E501
suite, validate_file)
except ImportError:
from .test_account_payment_sepa import suite, validate_file