changeset 5973fef883d9 in modules/account_payment_clearing:default
details: 
https://hg.tryton.org/modules/account_payment_clearing?cmd=changeset;node=5973fef883d9
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        |  3 ---
 payment.py        |  2 --
 setup.py          |  7 ++++---
 statement.py      |  2 --
 tests/__init__.py |  2 +-
 6 files changed, 7 insertions(+), 11 deletions(-)

diffs (79 lines):

diff -r 4ddb916849ac -r 5973fef883d9 .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 4ddb916849ac -r 5973fef883d9 account.py
--- a/account.py        Thu Jan 16 21:29:51 2020 +0100
+++ b/account.py        Sun Mar 01 12:33:51 2020 +0100
@@ -3,9 +3,6 @@
 from trytond.pool import PoolMeta
 
 
-__all__ = ['Move']
-
-
 class Move(metaclass=PoolMeta):
     __name__ = 'account.move'
 
diff -r 4ddb916849ac -r 5973fef883d9 payment.py
--- a/payment.py        Thu Jan 16 21:29:51 2020 +0100
+++ b/payment.py        Sun Mar 01 12:33:51 2020 +0100
@@ -8,8 +8,6 @@
 from trytond.transaction import Transaction
 from trytond.wizard import Wizard, StateView, StateTransition, Button
 
-__all__ = ['Journal', 'Payment', 'Succeed', 'SucceedStart']
-
 
 class Journal(metaclass=PoolMeta):
     __name__ = 'account.payment.journal'
diff -r 4ddb916849ac -r 5973fef883d9 setup.py
--- a/setup.py  Thu Jan 16 21:29:51 2020 +0100
+++ b/setup.py  Sun Mar 01 12:33:51 2020 +0100
@@ -83,8 +83,8 @@
     keywords='tryton account payment clearing',
     package_dir={'trytond.modules.account_payment_clearing': '.'},
     packages=(
-        ['trytond.modules.account_payment_clearing'] +
-        ['trytond.modules.account_payment_clearing.%s' % p
+        ['trytond.modules.account_payment_clearing']
+        + ['trytond.modules.account_payment_clearing.%s' % p
             for p in find_packages()]
         ),
     package_data={
@@ -99,7 +99,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 4ddb916849ac -r 5973fef883d9 statement.py
--- a/statement.py      Thu Jan 16 21:29:51 2020 +0100
+++ b/statement.py      Sun Mar 01 12:33:51 2020 +0100
@@ -5,8 +5,6 @@
 from trytond.pyson import Eval, If, Bool
 from trytond.transaction import Transaction
 
-__all__ = ['Statement', 'StatementLine']
-
 
 class Statement(metaclass=PoolMeta):
     __name__ = 'account.statement'
diff -r 4ddb916849ac -r 5973fef883d9 tests/__init__.py
--- a/tests/__init__.py Thu Jan 16 21:29:51 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_clearing.tests.test_account_payment_clearing 
import suite
+    from 
trytond.modules.account_payment_clearing.tests.test_account_payment_clearing 
import suite  # noqa: E501
 except ImportError:
     from .test_account_payment_clearing import suite
 

Reply via email to