changeset f3edbd57f5e5 in modules/sale_payment:default
details: 
https://hg.tryton.org/modules/sale_payment?cmd=changeset;node=f3edbd57f5e5
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 --
 sale.py    |  2 --
 setup.py   |  7 ++++---
 4 files changed, 6 insertions(+), 7 deletions(-)

diffs (54 lines):

diff -r 5eed77be3879 -r f3edbd57f5e5 .flake8
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/.flake8   Sun Mar 01 12:33:53 2020 +0100
@@ -0,0 +1,2 @@
+[flake8]
+ignore=E123,E124,E126,E128,W503
diff -r 5eed77be3879 -r f3edbd57f5e5 account.py
--- a/account.py        Wed Dec 04 11:09:36 2019 +0100
+++ b/account.py        Sun Mar 01 12:33:53 2020 +0100
@@ -7,8 +7,6 @@
 
 from trytond.modules.account_payment.exceptions import PaymentValidationError
 
-__all__ = ['Payment', 'Invoice']
-
 
 def sale_payment_confirm(func):
     @functools.wraps(func)
diff -r 5eed77be3879 -r f3edbd57f5e5 sale.py
--- a/sale.py   Wed Dec 04 11:09:36 2019 +0100
+++ b/sale.py   Sun Mar 01 12:33:53 2020 +0100
@@ -8,8 +8,6 @@
 from trytond.pool import PoolMeta
 from trytond.pyson import Eval, If
 
-__all__ = ['Sale']
-
 
 def no_payment(error):
     def decorator(func):
diff -r 5eed77be3879 -r f3edbd57f5e5 setup.py
--- a/setup.py  Wed Dec 04 11:09:36 2019 +0100
+++ b/setup.py  Sun Mar 01 12:33:53 2020 +0100
@@ -81,8 +81,8 @@
     keywords='tryton sale payment',
     package_dir={'trytond.modules.sale_payment': '.'},
     packages=(
-        ['trytond.modules.sale_payment'] +
-        ['trytond.modules.sale_payment.%s' % p for p in find_packages()]
+        ['trytond.modules.sale_payment']
+        + ['trytond.modules.sale_payment.%s' % p for p in find_packages()]
         ),
     package_data={
         'trytond.modules.sale_payment': (info.get('xml', [])
@@ -95,7 +95,8 @@
         'Framework :: Tryton',
         '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)',

Reply via email to