diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000000..e1c6495da9 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,3 @@ +[settings] +multi_line_output=4 +known_first_party=trytond diff --git a/__init__.py b/__init__.py index c691c3e6e2..4def8f2788 100644 --- a/__init__.py +++ b/__init__.py @@ -2,10 +2,8 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from . import account -from . import sale -from . import purchase -from . import stock + +from . import account, purchase, sale, stock def register(): diff --git a/account.py b/account.py index d8fda8a0e3..0b81fdee9f 100644 --- a/account.py +++ b/account.py @@ -1,8 +1,8 @@ # 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 Pool, PoolMeta from trytond.model import fields +from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval diff --git a/purchase.py b/purchase.py index 1bc03e97a6..8a31dbf5c6 100644 --- a/purchase.py +++ b/purchase.py @@ -1,8 +1,8 @@ # 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 from trytond.model import fields +from trytond.pool import PoolMeta from trytond.pyson import Eval diff --git a/sale.py b/sale.py index 6bc1b64474..b458abda26 100644 --- a/sale.py +++ b/sale.py @@ -1,8 +1,8 @@ # 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 Pool, PoolMeta from trytond.model import fields +from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval diff --git a/setup.py b/setup.py index c1b3a572ad..a05c740d61 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,8 @@ import io import os import re from configparser import ConfigParser -from setuptools import setup, find_packages + +from setuptools import find_packages, setup def read(fname): diff --git a/stock.py b/stock.py index 302cd70484..0c5b167173 100644 --- a/stock.py +++ b/stock.py @@ -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.pool import PoolMeta, Pool +from trytond.pool import Pool, PoolMeta class Move(metaclass=PoolMeta): diff --git a/tests/__init__.py b/tests/__init__.py index 01aa0c6f88..b4fb641568 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,7 +2,8 @@ # this repository contains the full copyright notices and license terms. try: - from trytond.modules.account_tax_rule_country.tests.test_account_tax_rule_country import suite # noqa: E501 + from trytond.modules.account_tax_rule_country.tests.test_account_tax_rule_country import \ + suite # noqa: E501 except ImportError: from .test_account_tax_rule_country import suite diff --git a/tests/test_account_tax_rule_country.py b/tests/test_account_tax_rule_country.py index e19a5dd872..9588ee1922 100644 --- a/tests/test_account_tax_rule_country.py +++ b/tests/test_account_tax_rule_country.py @@ -2,13 +2,12 @@ # this repository contains the full copyright notices and license terms. import unittest -from trytond.pool import Pool import trytond.tests.test_tryton -from trytond.tests.test_tryton import ModuleTestCase, with_transaction - -from trytond.modules.company.tests import ( - create_company, set_company, CompanyTestMixin) from trytond.modules.account.tests import create_chart +from trytond.modules.company.tests import ( + CompanyTestMixin, create_company, set_company) +from trytond.pool import Pool +from trytond.tests.test_tryton import ModuleTestCase, with_transaction class AccountTaxRuleCountryTestCase(CompanyTestMixin, ModuleTestCase):