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 f7c5b46957..45672c8c51 100644 --- a/__init__.py +++ b/__init__.py @@ -2,6 +2,7 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool + from . import edocument __all__ = ['register'] diff --git a/edocument.py b/edocument.py index 37bb2f9878..7b6776c53b 100644 --- a/edocument.py +++ b/edocument.py @@ -5,6 +5,8 @@ import os import genshi import genshi.template +# XXX fix: https://genshi.edgewall.org/ticket/582 +from genshi.template.astutil import ASTCodeGenerator, ASTTransformer from trytond.model import Model from trytond.pool import Pool @@ -12,8 +14,6 @@ from trytond.rpc import RPC from trytond.tools import cached_property from trytond.transaction import Transaction -# XXX fix: https://genshi.edgewall.org/ticket/582 -from genshi.template.astutil import ASTCodeGenerator, ASTTransformer if not hasattr(ASTCodeGenerator, 'visit_NameConstant'): def visit_NameConstant(self, node): if node.value is None: diff --git a/setup.py b/setup.py index 0f5be67f4c..8fd46adca9 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/tests/__init__.py b/tests/__init__.py index d5fc3fb863..a5d54f627c 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.edocument_uncefact.tests.test_edocument_uncefact import suite # noqa: E501 + from trytond.modules.edocument_uncefact.tests.test_edocument_uncefact import \ + suite # noqa: E501 except ImportError: from .test_edocument_uncefact import suite diff --git a/tests/test_edocument_uncefact.py b/tests/test_edocument_uncefact.py index 74b7798a88..8e2a0081b1 100644 --- a/tests/test_edocument_uncefact.py +++ b/tests/test_edocument_uncefact.py @@ -5,14 +5,14 @@ import datetime import os import unittest from decimal import Decimal -from unittest.mock import Mock, MagicMock +from unittest.mock import MagicMock, Mock from lxml import etree from trytond.pool import Pool -from trytond.tests.test_tryton import (ModuleTestCase, with_transaction, - activate_module) +from trytond.tests.test_tryton import ModuleTestCase, activate_module from trytond.tests.test_tryton import suite as test_suite +from trytond.tests.test_tryton import with_transaction def get_invoice():