changeset f587b308904f in modules/product_image:default
details:
https://hg.tryton.org/modules/product_image?cmd=changeset&node=f587b308904f
description:
Follow isort formatting
issue10928
diffstat:
.isort.cfg | 3 +++
__init__.py | 3 +--
product.py | 10 +++++-----
routes.py | 4 ++--
setup.py | 3 ++-
tests/__init__.py | 3 ++-
tests/test_product_image.py | 3 ++-
7 files changed, 17 insertions(+), 12 deletions(-)
diffs (105 lines):
diff -r 69c4f2364acb -r f587b308904f .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 69c4f2364acb -r f587b308904f __init__.py
--- a/__init__.py Mon Nov 01 17:08:11 2021 +0100
+++ b/__init__.py Sat Dec 11 17:58:43 2021 +0100
@@ -3,8 +3,7 @@
from trytond.pool import Pool
-from . import product
-from . import routes
+from . import product, routes
__all__ = ['register', 'routes']
diff -r 69c4f2364acb -r f587b308904f product.py
--- a/product.py Mon Nov 01 17:08:11 2021 +0100
+++ b/product.py Sat Dec 11 17:58:43 2021 +0100
@@ -2,15 +2,15 @@
# this repository contains the full copyright notices and license terms.
import io
import math
-from urllib.parse import urljoin, quote, urlencode
+from urllib.parse import quote, urlencode, urljoin
import PIL.Image
from trytond.config import config
-from trytond.model import ModelSQL, ModelView, MatchMixin, sequence_ordered
-from trytond.model import fields, Unique
-from trytond.pool import PoolMeta, Pool
-from trytond.pyson import Eval, Bool, If
+from trytond.model import (
+ MatchMixin, ModelSQL, ModelView, Unique, fields, sequence_ordered)
+from trytond.pool import Pool, PoolMeta
+from trytond.pyson import Bool, Eval, If
from trytond.tools import slugify
from trytond.transaction import Transaction
from trytond.url import http_host
diff -r 69c4f2364acb -r f587b308904f routes.py
--- a/routes.py Mon Nov 01 17:08:11 2021 +0100
+++ b/routes.py Sat Dec 11 17:58:43 2021 +0100
@@ -4,15 +4,15 @@
from http import HTTPStatus
except ImportError:
from http import client as HTTPStatus
+
from urllib.parse import unquote
from werkzeug.exceptions import abort
from werkzeug.wrappers import Response
from trytond.config import config
+from trytond.protocols.wrappers import with_pool, with_transaction
from trytond.wsgi import app
-from trytond.protocols.wrappers import with_pool, with_transaction
-
TIMEOUT = config.getint('product', 'image_timeout', default=365 * 24 * 60 * 60)
diff -r 69c4f2364acb -r f587b308904f setup.py
--- a/setup.py Mon Nov 01 17:08:11 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 69c4f2364acb -r f587b308904f tests/__init__.py
--- a/tests/__init__.py Mon Nov 01 17:08:11 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_image.tests.test_product_image import suite
# noqa: E501
+ from trytond.modules.product_image.tests.test_product_image import \
+ suite # noqa: E501
except ImportError:
from .test_product_image import suite
diff -r 69c4f2364acb -r f587b308904f tests/test_product_image.py
--- a/tests/test_product_image.py Mon Nov 01 17:08:11 2021 +0100
+++ b/tests/test_product_image.py Sat Dec 11 17:58:43 2021 +0100
@@ -7,8 +7,9 @@
import PIL.Image
from trytond.pool import Pool
-from trytond.tests.test_tryton import ModuleTestCase, with_transaction
+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 ProductImageTestCase(ModuleTestCase):