changeset 7796811eb63a in modules/google_maps:default
details: 
https://hg.tryton.org/modules/google_maps?cmd=changeset;node=7796811eb63a
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 |  4 ++--
 address.py  |  3 ---
 setup.py    |  7 ++++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diffs (64 lines):

diff -r abc83017b4c3 -r 7796811eb63a .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 abc83017b4c3 -r 7796811eb63a __init__.py
--- a/__init__.py       Wed Dec 04 11:09:35 2019 +0100
+++ b/__init__.py       Sun Mar 01 12:33:52 2020 +0100
@@ -2,10 +2,10 @@
 # this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
-from .address import *
+from . import address
 
 
 def register():
     Pool.register(
-        Address,
+        address.Address,
         module='google_maps', type_='model')
diff -r abc83017b4c3 -r 7796811eb63a address.py
--- a/address.py        Wed Dec 04 11:09:35 2019 +0100
+++ b/address.py        Sun Mar 01 12:33:52 2020 +0100
@@ -1,14 +1,11 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
 import urllib.parse
-import sys
 
 from trytond.model import fields
 from trytond.transaction import Transaction
 from trytond.pool import PoolMeta
 
-__all__ = ['Address']
-
 
 class Address(metaclass=PoolMeta):
     __name__ = 'party.address'
diff -r abc83017b4c3 -r 7796811eb63a setup.py
--- a/setup.py  Wed Dec 04 11:09:35 2019 +0100
+++ b/setup.py  Sun Mar 01 12:33:52 2020 +0100
@@ -78,8 +78,8 @@
     keywords='tryton google maps',
     package_dir={'trytond.modules.google_maps': '.'},
     packages=(
-        ['trytond.modules.google_maps'] +
-        ['trytond.modules.google_maps.%s' % p for p in find_packages()]
+        ['trytond.modules.google_maps']
+        + ['trytond.modules.google_maps.%s' % p for p in find_packages()]
         ),
     package_data={
         'trytond.modules.google_maps': (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