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
4447f291eb
commit
1f18c67958
7 files changed
+16
-21
No files matched your search
+8
-8
@@ -2,16 +2,16 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
from .commission import *
|
||||
from .invoice import *
|
||||
from .account import *
|
||||
from . import commission
|
||||
from . import invoice
|
||||
from . import account
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
Agent,
|
||||
Commission,
|
||||
Invoice,
|
||||
InvoiceLine,
|
||||
Move,
|
||||
commission.Agent,
|
||||
commission.Commission,
|
||||
invoice.Invoice,
|
||||
invoice.InvoiceLine,
|
||||
account.Move,
|
||||
module='commission_waiting', type_='model')
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['Move']
|
||||
|
||||
|
||||
class Move(metaclass=PoolMeta):
|
||||
__name__ = 'account.move'
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
|
||||
from trytond.pool import PoolMeta, Pool
|
||||
from trytond.model import ModelView, fields
|
||||
from trytond.pyson import Eval, Bool
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
__all__ = ['Agent', 'Commission']
|
||||
|
||||
|
||||
class Agent(metaclass=PoolMeta):
|
||||
__name__ = 'commission.agent'
|
||||
waiting_account = fields.Many2One('account.account', 'Waiting Account',
|
||||
|
||||
@@ -7,9 +7,6 @@ from trytond.pool import PoolMeta, Pool
|
||||
from trytond.model import ModelView, Workflow
|
||||
|
||||
|
||||
__all__ = ['Invoice', 'InvoiceLine']
|
||||
|
||||
|
||||
class Invoice(metaclass=PoolMeta):
|
||||
__name__ = 'account.invoice'
|
||||
|
||||
|
||||
@@ -79,8 +79,9 @@ setup(name=name,
|
||||
keywords='tryton commission',
|
||||
package_dir={'trytond.modules.commission_waiting': '.'},
|
||||
packages=(
|
||||
['trytond.modules.commission_waiting'] +
|
||||
['trytond.modules.commission_waiting.%s' % p for p in find_packages()]
|
||||
['trytond.modules.commission_waiting']
|
||||
+ ['trytond.modules.commission_waiting.%s' % p
|
||||
for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.commission_waiting': (info.get('xml', [])
|
||||
@@ -93,7 +94,8 @@ setup(name=name,
|
||||
'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)',
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
try:
|
||||
from trytond.modules.commission_waiting.tests.test_commission_waiting import suite
|
||||
from trytond.modules.commission_waiting.tests.test_commission_waiting import suite # noqa: E501
|
||||
except ImportError:
|
||||
from .test_commission_waiting import suite
|
||||
|
||||
|
||||
Reference in new issue
Block a user