From b8152dd541c2baa5284d7de698c645fcc7cb6e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 11 Dec 2021 17:58:42 +0100 Subject: [PATCH] Follow isort formatting issue10928 --- .isort.cfg | 3 +++ __init__.py | 4 ++-- customs.py | 7 +++---- product.py | 6 +++--- setup.py | 3 ++- tests/test_customs.py | 7 ++++--- 6 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 .isort.cfg 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 4ff5fd3ac5..a898f08596 100644 --- a/__init__.py +++ b/__init__.py @@ -2,8 +2,8 @@ # this repository contains the full copyright notices and license terms. from trytond.pool import Pool -from . import customs -from . import product + +from . import customs, product def register(): diff --git a/customs.py b/customs.py index f19eb01bc8..0509e6219c 100644 --- a/customs.py +++ b/customs.py @@ -6,11 +6,10 @@ from decimal import Decimal from sql import Null from trytond.model import ( - ModelSQL, ModelView, DeactivableMixin, MatchMixin, fields) -from trytond.pyson import Eval, If, Bool -from trytond.pool import Pool - + DeactivableMixin, MatchMixin, ModelSQL, ModelView, fields) from trytond.modules.product import price_digits +from trytond.pool import Pool +from trytond.pyson import Bool, Eval, If # Use 2 chars numbering to allow string comparison MONTHS = [ diff --git a/product.py b/product.py index d32d6d7efe..4ce5123457 100644 --- a/product.py +++ b/product.py @@ -1,11 +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.pool import PoolMeta, Pool +from trytond import backend from trytond.model import ModelSQL, ModelView, fields, sequence_ordered -from trytond.pyson import Eval, Or, Bool +from trytond.pool import Pool, PoolMeta +from trytond.pyson import Bool, Eval, Or from trytond.tools import grouped_slice from trytond.transaction import Transaction -from trytond import backend class Category(metaclass=PoolMeta): diff --git a/setup.py b/setup.py index 3b6be76c71..2ffce850bb 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/test_customs.py b/tests/test_customs.py index fad9c3a320..4a7130c591 100644 --- a/tests/test_customs.py +++ b/tests/test_customs.py @@ -3,12 +3,13 @@ import unittest -from decimal import Decimal from datetime import date +from decimal import Decimal -from trytond.tests.test_tryton import ModuleTestCase, with_transaction -from trytond.tests.test_tryton import suite as test_suite from trytond.pool import Pool +from trytond.tests.test_tryton import ModuleTestCase +from trytond.tests.test_tryton import suite as test_suite +from trytond.tests.test_tryton import with_transaction class CustomsTestCase(ModuleTestCase):