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 ca26219a3a..ee5329741f 100644 --- a/__init__.py +++ b/__init__.py @@ -2,10 +2,7 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from . import account -from . import currency -from . import purchase -from . import sale +from . import account, currency, purchase, sale __all__ = ['register'] diff --git a/account.py b/account.py index c7d55e1584..94ed559c39 100644 --- a/account.py +++ b/account.py @@ -4,12 +4,11 @@ from decimal import Decimal from trytond.i18n import gettext from trytond.model import ModelSQL, fields -from trytond.pool import PoolMeta, Pool -from trytond.pyson import Eval - from trytond.modules.account.exceptions import AccountMissing from trytond.modules.account_invoice.exceptions import PaymentTermComputeError from trytond.modules.company.model import CompanyValueMixin +from trytond.pool import Pool, PoolMeta +from trytond.pyson import Eval class Configuration(metaclass=PoolMeta): diff --git a/purchase.py b/purchase.py index 1b453fc9a9..0f5bfe1874 100644 --- a/purchase.py +++ b/purchase.py @@ -1,12 +1,11 @@ # 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 fields +from trytond.modules.account_invoice.exceptions import PaymentTermComputeError from trytond.pool import PoolMeta from trytond.pyson import Eval from trytond.transaction import Transaction -from trytond.modules.account_invoice.exceptions import PaymentTermComputeError - class Purchase(metaclass=PoolMeta): __name__ = 'purchase.purchase' diff --git a/sale.py b/sale.py index 2466a90a43..9df9fe3006 100644 --- a/sale.py +++ b/sale.py @@ -1,9 +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.model import fields -from trytond.pool import PoolMeta, Pool - from trytond.modules.account_invoice.exceptions import PaymentTermComputeError +from trytond.pool import Pool, PoolMeta class Sale(metaclass=PoolMeta): diff --git a/setup.py b/setup.py index 4e6deff286..ab25f58f43 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, slice=None): diff --git a/tests/__init__.py b/tests/__init__.py index 64dc152b7f..cc51342dd0 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_cash_rounding.tests.test_account_cash_rounding import suite # noqa: E501 + from trytond.modules.account_cash_rounding.tests.test_account_cash_rounding import \ + suite # noqa: E501 except ImportError: from .test_account_cash_rounding import suite diff --git a/tests/test_account_cash_rounding.py b/tests/test_account_cash_rounding.py index 3497d4bd63..060b4e1f78 100644 --- a/tests/test_account_cash_rounding.py +++ b/tests/test_account_cash_rounding.py @@ -1,14 +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.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 class AccountCashRoundingTestCase(ModuleTestCase):