changeset 2f5cf0fab1ea in modules/party_siret:default
details: 
https://hg.tryton.org/modules/party_siret?cmd=changeset;node=2f5cf0fab1ea
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 |  8 ++++----
 address.py  |  2 --
 party.py    |  2 --
 setup.py    |  7 ++++---
 5 files changed, 10 insertions(+), 11 deletions(-)

diffs (74 lines):

diff -r d925753f0009 -r 2f5cf0fab1ea .flake8
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/.flake8   Sun Mar 01 12:33:52 2020 +0100
@@ -0,0 +1,2 @@
+[flake8]
+ignore=E123,E124,E126,E128,W503
diff -r d925753f0009 -r 2f5cf0fab1ea __init__.py
--- a/__init__.py       Wed Dec 04 11:09:36 2019 +0100
+++ b/__init__.py       Sun Mar 01 12:33:52 2020 +0100
@@ -2,12 +2,12 @@
 # this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
-from .party import *
-from .address import *
+from . import party
+from . import address
 
 
 def register():
     Pool.register(
-        Party,
-        Address,
+        party.Party,
+        address.Address,
         module='party_siret', type_='model')
diff -r d925753f0009 -r 2f5cf0fab1ea address.py
--- a/address.py        Wed Dec 04 11:09:36 2019 +0100
+++ b/address.py        Sun Mar 01 12:33:52 2020 +0100
@@ -7,8 +7,6 @@
 from . import luhn
 from .exceptions import SIRETValidationError
 
-__all__ = ['Address']
-
 
 class Address(metaclass=PoolMeta):
     __name__ = 'party.address'
diff -r d925753f0009 -r 2f5cf0fab1ea party.py
--- a/party.py  Wed Dec 04 11:09:36 2019 +0100
+++ b/party.py  Sun Mar 01 12:33:52 2020 +0100
@@ -7,8 +7,6 @@
 from . import luhn
 from .exceptions import SIRENValidationError
 
-__all__ = ['Party']
-
 
 class Party(metaclass=PoolMeta):
     __name__ = 'party.party'
diff -r d925753f0009 -r 2f5cf0fab1ea setup.py
--- a/setup.py  Wed Dec 04 11:09:36 2019 +0100
+++ b/setup.py  Sun Mar 01 12:33:52 2020 +0100
@@ -78,8 +78,8 @@
     keywords='tryton party siret siren',
     package_dir={'trytond.modules.party_siret': '.'},
     packages=(
-        ['trytond.modules.party_siret'] +
-        ['trytond.modules.party_siret.%s' % p for p in find_packages()]
+        ['trytond.modules.party_siret']
+        + ['trytond.modules.party_siret.%s' % p for p in find_packages()]
         ),
     package_data={
         'trytond.modules.party_siret': (info.get('xml', [])
@@ -93,7 +93,8 @@
         'Intended Audience :: Financial and Insurance Industry',
         'Intended Audience :: Legal Industry',
         'Intended Audience :: Manufacturing',
-        '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