changeset 6985af9c36f9 in modules/product_kit:default
details:
https://hg.tryton.org/modules/product_kit?cmd=changeset&node=6985af9c36f9
description:
Follow isort formatting
issue10928
diffstat:
.isort.cfg | 3 +++
__init__.py | 6 +-----
account.py | 2 +-
product.py | 7 +++----
purchase.py | 11 +++++------
sale.py | 11 +++++------
setup.py | 3 ++-
stock.py | 5 ++---
tests/__init__.py | 3 ++-
tests/test_product_kit.py | 9 ++++-----
10 files changed, 28 insertions(+), 32 deletions(-)
diffs (167 lines):
diff -r 1f991f9b719b -r 6985af9c36f9 .isort.cfg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.isort.cfg Sat Dec 11 17:58:43 2021 +0100
@@ -0,0 +1,3 @@
+[settings]
+multi_line_output=4
+known_first_party=trytond
diff -r 1f991f9b719b -r 6985af9c36f9 __init__.py
--- a/__init__.py Mon Nov 01 17:30:34 2021 +0100
+++ b/__init__.py Sat Dec 11 17:58:43 2021 +0100
@@ -2,11 +2,7 @@
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool
-from . import product
-from . import sale
-from . import purchase
-from . import stock
-from . import account
+from . import account, product, purchase, sale, stock
__all__ = ['register']
diff -r 1f991f9b719b -r 6985af9c36f9 account.py
--- a/account.py Mon Nov 01 17:30:34 2021 +0100
+++ b/account.py Sat Dec 11 17:58:43 2021 +0100
@@ -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.
from trytond.model import ModelView, Workflow
-from trytond.pool import PoolMeta, Pool
+from trytond.pool import Pool, PoolMeta
class Invoice(metaclass=PoolMeta):
diff -r 1f991f9b719b -r 6985af9c36f9 product.py
--- a/product.py Mon Nov 01 17:30:34 2021 +0100
+++ b/product.py Sat Dec 11 17:58:43 2021 +0100
@@ -3,11 +3,10 @@
from decimal import Decimal
from trytond.model import (
- ModelView, ModelSQL, ModelStorage, sequence_ordered, fields)
-from trytond.pyson import Eval, If, Bool
-from trytond.pool import PoolMeta, Pool
-
+ ModelSQL, ModelStorage, ModelView, fields, sequence_ordered)
from trytond.modules.product import round_price
+from trytond.pool import Pool, PoolMeta
+from trytond.pyson import Bool, Eval, If
class Template(metaclass=PoolMeta):
diff -r 1f991f9b719b -r 6985af9c36f9 purchase.py
--- a/purchase.py Mon Nov 01 17:30:34 2021 +0100
+++ b/purchase.py Sat Dec 11 17:58:43 2021 +0100
@@ -1,16 +1,15 @@
# 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.i18n import gettext
-from trytond.pool import PoolMeta, Pool
from trytond.model import ModelSQL, ModelView, fields
-
from trytond.modules.product import round_price
+from trytond.pool import Pool, PoolMeta
+from .common import (
+ AmendmentLineMixin, get_shipments_returns, handle_shipment_exception_mixin,
+ order_line_component_mixin, order_line_mixin, order_mixin,
+ search_shipments_returns)
from .product import ComponentMixin
-from .common import order_mixin, order_line_mixin, order_line_component_mixin
-from .common import get_shipments_returns, search_shipments_returns
-from .common import handle_shipment_exception_mixin
-from .common import AmendmentLineMixin
class Purchase(order_mixin('purchase'), metaclass=PoolMeta):
diff -r 1f991f9b719b -r 6985af9c36f9 sale.py
--- a/sale.py Mon Nov 01 17:30:34 2021 +0100
+++ b/sale.py Sat Dec 11 17:58:43 2021 +0100
@@ -1,16 +1,15 @@
# 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.i18n import gettext
-from trytond.pool import PoolMeta, Pool
from trytond.model import ModelSQL, ModelView, fields
-
from trytond.modules.product import round_price
+from trytond.pool import Pool, PoolMeta
+from .common import (
+ AmendmentLineMixin, get_shipments_returns, handle_shipment_exception_mixin,
+ order_line_component_mixin, order_line_mixin, order_mixin,
+ search_shipments_returns)
from .product import ComponentMixin
-from .common import order_mixin, order_line_mixin, order_line_component_mixin
-from .common import get_shipments_returns, search_shipments_returns
-from .common import handle_shipment_exception_mixin
-from .common import AmendmentLineMixin
class Sale(order_mixin('sale'), metaclass=PoolMeta):
diff -r 1f991f9b719b -r 6985af9c36f9 setup.py
--- a/setup.py Mon Nov 01 17:30:34 2021 +0100
+++ b/setup.py Sat Dec 11 17:58:43 2021 +0100
@@ -6,7 +6,8 @@
import os
import re
from configparser import ConfigParser
-from setuptools import setup, find_packages
+
+from setuptools import find_packages, setup
def read(fname):
diff -r 1f991f9b719b -r 6985af9c36f9 stock.py
--- a/stock.py Mon Nov 01 17:30:34 2021 +0100
+++ b/stock.py Sat Dec 11 17:58:43 2021 +0100
@@ -3,11 +3,10 @@
from decimal import Decimal
from trytond.model import fields
-from trytond.pool import PoolMeta, Pool
+from trytond.modules.product import round_price
+from trytond.pool import Pool, PoolMeta
from trytond.transaction import Transaction
-from trytond.modules.product import round_price
-
class Move(metaclass=PoolMeta):
__name__ = 'stock.move'
diff -r 1f991f9b719b -r 6985af9c36f9 tests/__init__.py
--- a/tests/__init__.py Mon Nov 01 17:30:34 2021 +0100
+++ b/tests/__init__.py Sat Dec 11 17:58:43 2021 +0100
@@ -2,7 +2,8 @@
# this repository contains the full copyright notices and license terms.
try:
- from trytond.modules.product_kit.tests.test_product_kit import suite #
noqa: E501
+ from trytond.modules.product_kit.tests.test_product_kit import \
+ suite # noqa: E501
except ImportError:
from .test_product_kit import suite
diff -r 1f991f9b719b -r 6985af9c36f9 tests/test_product_kit.py
--- a/tests/test_product_kit.py Mon Nov 01 17:30:34 2021 +0100
+++ b/tests/test_product_kit.py Sat Dec 11 17:58:43 2021 +0100
@@ -1,13 +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.
+import doctest
import unittest
-import doctest
-from trytond.tests.test_tryton import ModuleTestCase
+from trytond.modules.company.tests import CompanyTestMixin
+from trytond.tests.test_tryton import (
+ ModuleTestCase, doctest_checker, doctest_teardown)
from trytond.tests.test_tryton import suite as test_suite
-from trytond.tests.test_tryton import doctest_teardown
-from trytond.tests.test_tryton import doctest_checker
-from trytond.modules.company.tests import CompanyTestMixin
class ProductKitTestCase(CompanyTestMixin, ModuleTestCase):