changeset c7c4b0395381 in modules/account_payment_stripe:default
details: 
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset;node=c7c4b0395381
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 ++
 party.py          |  2 --
 payment.py        |  2 --
 setup.py          |  7 ++++---
 tests/__init__.py |  2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)

diffs (66 lines):

diff -r 4f9572ac99ad -r c7c4b0395381 .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 4f9572ac99ad -r c7c4b0395381 party.py
--- a/party.py  Wed Feb 19 22:58:26 2020 +0100
+++ b/party.py  Sun Mar 01 12:33:51 2020 +0100
@@ -3,8 +3,6 @@
 from trytond.pool import PoolMeta
 from trytond.model import fields
 
-__all__ = ['Party', 'Replace']
-
 
 class Party(metaclass=PoolMeta):
     __name__ = 'party.party'
diff -r 4f9572ac99ad -r c7c4b0395381 payment.py
--- a/payment.py        Wed Feb 19 22:58:26 2020 +0100
+++ b/payment.py        Sun Mar 01 12:33:51 2020 +0100
@@ -27,8 +27,6 @@
 from trytond.modules.account_payment.exceptions import (
     ProcessError, PaymentValidationError)
 
-__all__ = ['Journal', 'Group', 'Payment', 'Account', 'Customer',
-    'Checkout', 'CheckoutPage']
 logger = logging.getLogger(__name__)
 
 RETRY_CODES = {'lock_timeout', 'token_in_use'}
diff -r 4f9572ac99ad -r c7c4b0395381 setup.py
--- a/setup.py  Wed Feb 19 22:58:26 2020 +0100
+++ b/setup.py  Sun Mar 01 12:33:51 2020 +0100
@@ -79,8 +79,8 @@
     keywords='tryton account payment stripe',
     package_dir={'trytond.modules.account_payment_stripe': '.'},
     packages=(
-        ['trytond.modules.account_payment_stripe'] +
-        ['trytond.modules.account_payment_stripe.%s' % p
+        ['trytond.modules.account_payment_stripe']
+        + ['trytond.modules.account_payment_stripe.%s' % p
             for p in find_packages()]
         ),
     package_data={
@@ -95,7 +95,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 4f9572ac99ad -r c7c4b0395381 tests/__init__.py
--- a/tests/__init__.py Wed Feb 19 22:58:26 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_stripe.tests.test_account_payment_stripe import 
suite
+    from 
trytond.modules.account_payment_stripe.tests.test_account_payment_stripe import 
suite  # noqa: E501
 except ImportError:
     from .test_account_payment_stripe import suite
 

Reply via email to