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:
+10
-10
@@ -2,18 +2,18 @@
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
from .routing import *
|
||||
from .production import *
|
||||
from .product import *
|
||||
from . import routing
|
||||
from . import production
|
||||
from . import product
|
||||
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
Routing,
|
||||
Operation,
|
||||
RoutingStep,
|
||||
Routing_BOM,
|
||||
Production,
|
||||
ProductBom,
|
||||
ProductionLeadTime,
|
||||
routing.Routing,
|
||||
routing.RoutingOperation,
|
||||
routing.RoutingStep,
|
||||
routing.Routing_BOM,
|
||||
production.Production,
|
||||
product.ProductBom,
|
||||
product.ProductionLeadTime,
|
||||
module='production_routing', type_='model')
|
||||
|
||||
@@ -4,8 +4,6 @@ from trytond.pool import PoolMeta
|
||||
from trytond.model import fields
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['ProductBom', 'ProductionLeadTime']
|
||||
|
||||
|
||||
class ProductBom(metaclass=PoolMeta):
|
||||
__name__ = 'product.product-production.bom'
|
||||
|
||||
@@ -4,8 +4,6 @@ from trytond.pool import PoolMeta
|
||||
from trytond.model import fields
|
||||
from trytond.pyson import Eval
|
||||
|
||||
__all__ = ['Production']
|
||||
|
||||
|
||||
class Production(metaclass=PoolMeta):
|
||||
__name__ = 'production'
|
||||
|
||||
+1
-3
@@ -3,8 +3,6 @@
|
||||
from trytond.model import (
|
||||
ModelSQL, ModelView, DeactivableMixin, fields, sequence_ordered)
|
||||
|
||||
__all__ = ['Routing', 'Operation', 'RoutingStep', 'Routing_BOM']
|
||||
|
||||
|
||||
class Routing(DeactivableMixin, ModelSQL, ModelView):
|
||||
'Routing'
|
||||
@@ -15,7 +13,7 @@ class Routing(DeactivableMixin, ModelSQL, ModelView):
|
||||
'production.routing-production.bom', 'routing', 'bom', 'BOMs')
|
||||
|
||||
|
||||
class Operation(DeactivableMixin, ModelSQL, ModelView):
|
||||
class RoutingOperation(DeactivableMixin, ModelSQL, ModelView):
|
||||
'Operation'
|
||||
__name__ = 'production.routing.operation'
|
||||
name = fields.Char('Operation', required=True, translate=True)
|
||||
|
||||
@@ -79,8 +79,9 @@ setup(name=name,
|
||||
keywords='tryton production routing',
|
||||
package_dir={'trytond.modules.production_routing': '.'},
|
||||
packages=(
|
||||
['trytond.modules.production_routing'] +
|
||||
['trytond.modules.production_routing.%s' % p for p in find_packages()]
|
||||
['trytond.modules.production_routing']
|
||||
+ ['trytond.modules.production_routing.%s' % p
|
||||
for p in find_packages()]
|
||||
),
|
||||
package_data={
|
||||
'trytond.modules.production_routing': (info.get('xml', [])
|
||||
@@ -94,7 +95,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)',
|
||||
|
||||
Reference in New Issue
Block a user