changeset 82e7d890c8b6 in modules/account_fr:default
details: 
https://hg.tryton.org/modules/account_fr?cmd=changeset;node=82e7d890c8b6
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 ++
 __init__.py |  12 ++++++------
 account.py  |  13 +++++--------
 setup.py    |   7 ++++---
 4 files changed, 17 insertions(+), 17 deletions(-)

diffs (107 lines):

diff -r ac4a4bea8da5 -r 82e7d890c8b6 .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 ac4a4bea8da5 -r 82e7d890c8b6 __init__.py
--- a/__init__.py       Sun Feb 23 13:49:51 2020 +0100
+++ b/__init__.py       Sun Mar 01 12:33:51 2020 +0100
@@ -2,16 +2,16 @@
 # this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
-from .account import *
+from . import account
 
 
 def register():
     Pool.register(
-        TaxTemplate,
-        TaxRuleTemplate,
-        AccountFrFECStart,
-        AccountFrFECResult,
+        account.TaxTemplate,
+        account.TaxRuleTemplate,
+        account.FrFECStart,
+        account.FrFECResult,
         module='account_fr', type_='model')
     Pool.register(
-        AccountFrFEC,
+        account.FrFEC,
         module='account_fr', type_='wizard')
diff -r ac4a4bea8da5 -r 82e7d890c8b6 account.py
--- a/account.py        Sun Feb 23 13:49:51 2020 +0100
+++ b/account.py        Sun Mar 01 12:33:51 2020 +0100
@@ -20,10 +20,6 @@
 OPENING_NUMBER = config.get('account_fr', 'fec_opening_number', default="0")
 
 
-__all__ = ['TaxTemplate', 'TaxRuleTemplate',
-    'AccountFrFEC', 'AccountFrFECStart', 'AccountFrFECResult']
-
-
 class TaxTemplate(metaclass=PoolMeta):
     __name__ = 'account.tax.template'
 
@@ -73,7 +69,8 @@
                     ('tax_rule_ventes_intracommunautaires_19_6',
                         'tax_rule_ventes_intracommunautaires_taux_normal'),
                     ('tax_rule_ventes_intracommunautaires_7',
-                        
'tax_rule_ventes_intracommunautaires_taux_intermediaire'),
+                        'tax_rule_ventes_intracommunautaires_taux'
+                        '_intermediaire'),
                     ):
                 cursor.execute(*model_data.update(
                         columns=[model_data.fs_id],
@@ -84,7 +81,7 @@
         super(TaxRuleTemplate, cls).__register__(module_name)
 
 
-class AccountFrFEC(Wizard):
+class FrFEC(Wizard):
     'Generate FEC'
     __name__ = 'account.fr.fec'
 
@@ -325,7 +322,7 @@
         return line.move.date
 
 
-class AccountFrFECStart(ModelView):
+class FrFECStart(ModelView):
     'Generate FEC'
     __name__ = 'account.fr.fec.start'
 
@@ -349,7 +346,7 @@
         return 'is-bic'
 
 
-class AccountFrFECResult(ModelView):
+class FrFECResult(ModelView):
     'Generate FEC'
     __name__ = 'account.fr.fec.result'
 
diff -r ac4a4bea8da5 -r 82e7d890c8b6 setup.py
--- a/setup.py  Sun Feb 23 13:49:51 2020 +0100
+++ b/setup.py  Sun Mar 01 12:33:51 2020 +0100
@@ -79,8 +79,8 @@
     keywords='tryton account chart french fec',
     package_dir={'trytond.modules.account_fr': '.'},
     packages=(
-        ['trytond.modules.account_fr'] +
-        ['trytond.modules.account_fr.%s' % p for p in find_packages()]
+        ['trytond.modules.account_fr']
+        + ['trytond.modules.account_fr.%s' % p for p in find_packages()]
         ),
     package_data={
         'trytond.modules.account_fr': (info.get('xml', [])
@@ -94,7 +94,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)',

Reply via email to