changeset b6c048ceffa4 in modules/sale_complaint:default
details: 
https://hg.tryton.org/modules/sale_complaint?cmd=changeset;node=b6c048ceffa4
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  |  24 ++++++++++++------------
 account.py   |   2 --
 complaint.py |   3 ---
 sale.py      |   2 --
 setup.py     |   7 ++++---
 6 files changed, 18 insertions(+), 22 deletions(-)

diffs (103 lines):

diff -r f3e17d250a24 -r b6c048ceffa4 .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 f3e17d250a24 -r b6c048ceffa4 __init__.py
--- a/__init__.py       Fri Dec 06 17:33:46 2019 +0100
+++ b/__init__.py       Sun Mar 01 12:33:53 2020 +0100
@@ -2,20 +2,20 @@
 # this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
-from .complaint import *
-from .sale import *
-from .account import *
+from . import complaint
+from . import sale
+from . import account
 
 
 def register():
     Pool.register(
-        Type,
-        Complaint,
-        Action,
-        Action_SaleLine,
-        Action_InvoiceLine,
-        Configuration,
-        ConfigurationSequence,
-        Sale,
-        InvoiceLine,
+        complaint.Type,
+        complaint.Complaint,
+        complaint.Action,
+        complaint.Action_SaleLine,
+        complaint.Action_InvoiceLine,
+        sale.Configuration,
+        sale.ConfigurationSequence,
+        sale.Sale,
+        account.InvoiceLine,
         module='sale_complaint', type_='model')
diff -r f3e17d250a24 -r b6c048ceffa4 account.py
--- a/account.py        Fri Dec 06 17:33:46 2019 +0100
+++ b/account.py        Sun Mar 01 12:33:53 2020 +0100
@@ -3,8 +3,6 @@
 
 from trytond.pool import PoolMeta
 
-__all__ = ['InvoiceLine']
-
 
 class InvoiceLine(metaclass=PoolMeta):
     __name__ = 'account.invoice.line'
diff -r f3e17d250a24 -r b6c048ceffa4 complaint.py
--- a/complaint.py      Fri Dec 06 17:33:46 2019 +0100
+++ b/complaint.py      Sun Mar 01 12:33:53 2020 +0100
@@ -12,9 +12,6 @@
 
 from trytond.modules.product import price_digits
 
-__all__ = ['Type', 'Complaint', 'Action',
-    'Action_SaleLine', 'Action_InvoiceLine']
-
 
 class Type(ModelSQL, ModelView):
     'Customer Complaint Type'
diff -r f3e17d250a24 -r b6c048ceffa4 sale.py
--- a/sale.py   Fri Dec 06 17:33:46 2019 +0100
+++ b/sale.py   Sun Mar 01 12:33:53 2020 +0100
@@ -6,8 +6,6 @@
 from trytond.model import fields
 from trytond.pyson import Eval
 
-__all__ = ['Configuration', 'ConfigurationSequence', 'Sale']
-
 
 class Configuration(metaclass=PoolMeta):
     __name__ = 'sale.configuration'
diff -r f3e17d250a24 -r b6c048ceffa4 setup.py
--- a/setup.py  Fri Dec 06 17:33:46 2019 +0100
+++ b/setup.py  Sun Mar 01 12:33:53 2020 +0100
@@ -79,8 +79,8 @@
     keywords='tryton sale customer complaint',
     package_dir={'trytond.modules.sale_complaint': '.'},
     packages=(
-        ['trytond.modules.sale_complaint'] +
-        ['trytond.modules.sale_complaint.%s' % p for p in find_packages()]
+        ['trytond.modules.sale_complaint']
+        + ['trytond.modules.sale_complaint.%s' % p for p in find_packages()]
         ),
     package_data={
         'trytond.modules.sale_complaint': (info.get('xml', [])
@@ -93,7 +93,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