changeset c0280ee6b0cd in modules/purchase_shipment_cost:default
details: 
https://hg.tryton.org/modules/purchase_shipment_cost?cmd=changeset;node=c0280ee6b0cd
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 ++
 carrier.py                           |  2 --
 setup.py                             |  7 ++++---
 stock.py                             |  2 --
 tests/__init__.py                    |  2 +-
 tests/test_purchase_shipment_cost.py |  3 ++-
 6 files changed, 9 insertions(+), 9 deletions(-)

diffs (79 lines):

diff -r 4a654af45cbe -r c0280ee6b0cd .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 4a654af45cbe -r c0280ee6b0cd carrier.py
--- a/carrier.py        Wed Jan 08 14:36:45 2020 +0100
+++ b/carrier.py        Sun Mar 01 12:33:53 2020 +0100
@@ -3,8 +3,6 @@
 from trytond.model import fields
 from trytond.pool import PoolMeta
 
-__all__ = ['Carrier']
-
 
 class Carrier(metaclass=PoolMeta):
     __name__ = 'carrier'
diff -r 4a654af45cbe -r c0280ee6b0cd setup.py
--- a/setup.py  Wed Jan 08 14:36:45 2020 +0100
+++ b/setup.py  Sun Mar 01 12:33:53 2020 +0100
@@ -87,8 +87,8 @@
     keywords='tryton purchase shipment cost',
     package_dir={'trytond.modules.purchase_shipment_cost': '.'},
     packages=(
-        ['trytond.modules.purchase_shipment_cost'] +
-        ['trytond.modules.purchase_shipment_cost.%s' % p
+        ['trytond.modules.purchase_shipment_cost']
+        + ['trytond.modules.purchase_shipment_cost.%s' % p
             for p in find_packages()]
         ),
     package_data={
@@ -103,7 +103,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)',
diff -r 4a654af45cbe -r c0280ee6b0cd stock.py
--- a/stock.py  Wed Jan 08 14:36:45 2020 +0100
+++ b/stock.py  Sun Mar 01 12:33:53 2020 +0100
@@ -10,8 +10,6 @@
 
 from trytond.modules.product import price_digits
 
-__all__ = ['ShipmentIn', 'Move']
-
 
 class ShipmentIn(metaclass=PoolMeta):
     __name__ = 'stock.shipment.in'
diff -r 4a654af45cbe -r c0280ee6b0cd tests/__init__.py
--- a/tests/__init__.py Wed Jan 08 14:36:45 2020 +0100
+++ b/tests/__init__.py Sun Mar 01 12:33:53 2020 +0100
@@ -2,7 +2,7 @@
 # this repository contains the full copyright notices and license terms.
 
 try:
-    from 
trytond.modules.purchase_shipment_cost.tests.test_purchase_shipment_cost import 
suite
+    from 
trytond.modules.purchase_shipment_cost.tests.test_purchase_shipment_cost import 
suite  # noqa: E501
 except ImportError:
     from .test_purchase_shipment_cost import suite
 
diff -r 4a654af45cbe -r c0280ee6b0cd tests/test_purchase_shipment_cost.py
--- a/tests/test_purchase_shipment_cost.py      Wed Jan 08 14:36:45 2020 +0100
+++ b/tests/test_purchase_shipment_cost.py      Sun Mar 01 12:33:53 2020 +0100
@@ -28,7 +28,8 @@
             checker=doctest_checker,
             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
     suite.addTests(doctest.DocFileSuite(
-            
'scenario_purchase_shipment_cost_with_account_stock_anglo_saxon.rst',
+            'scenario_purchase_shipment_cost_'
+            'with_account_stock_anglo_saxon.rst',
             tearDown=doctest_teardown, encoding='utf-8',
             checker=doctest_checker,
             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))

Reply via email to