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
This commit is contained in:
1 parent
10a45a7336
commit
8deba2d7e3
6 files changed
+8
-10
No files matched your search
@@ -6,8 +6,6 @@ from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['Carrier']
|
||||
|
||||
|
||||
class Carrier(metaclass=PoolMeta):
|
||||
__name__ = 'carrier'
|
||||
|
||||
@@ -4,8 +4,6 @@ from decimal import Decimal
|
||||
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['Sale']
|
||||
|
||||
|
||||
class Sale(metaclass=PoolMeta):
|
||||
__name__ = 'sale.sale'
|
||||
|
||||
@@ -81,8 +81,9 @@ setup(name=name,
|
||||
keywords='tryton carrier percentage',
|
||||
package_dir={'trytond.modules.carrier_percentage': '.'},
|
||||
packages=(
|
||||
['trytond.modules.carrier_percentage'] +
|
||||
['trytond.modules.carrier_percentage.%s' % p for p in find_packages()]
|
||||
['trytond.modules.carrier_percentage']
|
||||
+ ['trytond.modules.carrier_percentage.%s' % p
|
||||
for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.carrier_percentage': (info.get('xml', [])
|
||||
@@ -96,7 +97,8 @@ setup(name=name,
|
||||
'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)',
|
||||
|
||||
@@ -5,8 +5,6 @@ from decimal import Decimal
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
__all__ = ['ShipmentIn', 'ShipmentOut']
|
||||
|
||||
|
||||
def _percentage_amount(lines, company):
|
||||
pool = Pool()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
try:
|
||||
from trytond.modules.carrier_percentage.tests.test_carrier_percentage import suite
|
||||
from trytond.modules.carrier_percentage.tests.test_carrier_percentage import suite # noqa: E501
|
||||
except ImportError:
|
||||
from .test_carrier_percentage import suite
|
||||
|
||||
|
||||
Reference in new issue
Block a user