diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..8913d96 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,2 @@ +[settings] +line_length=120 diff --git a/setup.cfg b/setup.cfg index 5ea56d1..c4b4641 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,3 +4,5 @@ DJANGO_SETTINGS_MODULE=static_precompiler.tests.django_settings [flake8] exclude = build, .git, static_precompiler/migrations/*, static_precompiler/south_migrations/* max-line-length = 120 + +[isort] diff --git a/static_precompiler/compilers/base.py b/static_precompiler/compilers/base.py index 46cbaf5..aaec762 100644 --- a/static_precompiler/compilers/base.py +++ b/static_precompiler/compilers/base.py @@ -9,8 +9,7 @@ from django.utils.functional import lazy from static_precompiler.models import Dependency -from static_precompiler.settings import (DISABLE_AUTO_COMPILE, OUTPUT_DIR, - ROOT, STATIC_ROOT) +from static_precompiler.settings import DISABLE_AUTO_COMPILE, OUTPUT_DIR, ROOT, STATIC_ROOT from static_precompiler.utils import get_mtime, normalize_path logger = logging.getLogger("static_precompiler") diff --git a/static_precompiler/templatetags/coffeescript.py b/static_precompiler/templatetags/coffeescript.py index 6d63ac1..62cfdb6 100644 --- a/static_precompiler/templatetags/coffeescript.py +++ b/static_precompiler/templatetags/coffeescript.py @@ -1,8 +1,7 @@ from django.template.base import Library from static_precompiler.compilers import CoffeeScript -from static_precompiler.templatetags.compile_static import \ - register_compiler_tags +from static_precompiler.templatetags.compile_static import register_compiler_tags register = Library() compiler = CoffeeScript() diff --git a/static_precompiler/templatetags/compile_static.py b/static_precompiler/templatetags/compile_static.py index 3a22b9d..cde4e58 100644 --- a/static_precompiler/templatetags/compile_static.py +++ b/static_precompiler/templatetags/compile_static.py @@ -4,11 +4,9 @@ from django.templatetags.static import static from django.utils import six -from static_precompiler.settings import (CACHE_TIMEOUT, PREPEND_STATIC_URL, - USE_CACHE) +from static_precompiler.settings import CACHE_TIMEOUT, PREPEND_STATIC_URL, USE_CACHE from static_precompiler.templatetags.base import container_tag -from static_precompiler.utils import (compile_static, get_cache, get_cache_key, - get_compiler_by_name, get_hexdigest) +from static_precompiler.utils import compile_static, get_cache, get_cache_key, get_compiler_by_name, get_hexdigest register = Library() diff --git a/static_precompiler/templatetags/less.py b/static_precompiler/templatetags/less.py index 2e907db..a27e4fd 100644 --- a/static_precompiler/templatetags/less.py +++ b/static_precompiler/templatetags/less.py @@ -1,8 +1,7 @@ from django.template.base import Library from static_precompiler.compilers import LESS -from static_precompiler.templatetags.compile_static import \ - register_compiler_tags +from static_precompiler.templatetags.compile_static import register_compiler_tags register = Library() compiler = LESS() diff --git a/static_precompiler/templatetags/sass.py b/static_precompiler/templatetags/sass.py index 6f6e844..a16006f 100644 --- a/static_precompiler/templatetags/sass.py +++ b/static_precompiler/templatetags/sass.py @@ -1,8 +1,7 @@ from django.template.base import Library from static_precompiler.compilers import SASS -from static_precompiler.templatetags.compile_static import \ - register_compiler_tags +from static_precompiler.templatetags.compile_static import register_compiler_tags register = Library() compiler = SASS() diff --git a/static_precompiler/templatetags/scss.py b/static_precompiler/templatetags/scss.py index 5d6b558..cccb9c0 100644 --- a/static_precompiler/templatetags/scss.py +++ b/static_precompiler/templatetags/scss.py @@ -1,8 +1,7 @@ from django.template.base import Library from static_precompiler.compilers import SCSS -from static_precompiler.templatetags.compile_static import \ - register_compiler_tags +from static_precompiler.templatetags.compile_static import register_compiler_tags register = Library() compiler = SCSS() diff --git a/static_precompiler/tests/test_management.py b/static_precompiler/tests/test_management.py index dfcb934..a99ab33 100644 --- a/static_precompiler/tests/test_management.py +++ b/static_precompiler/tests/test_management.py @@ -3,8 +3,7 @@ import pytest from django.core.management import call_command -from static_precompiler.management.commands.compilestatic import \ - get_scanned_dirs +from static_precompiler.management.commands.compilestatic import get_scanned_dirs from static_precompiler.settings import OUTPUT_DIR, ROOT, STATIC_ROOT diff --git a/static_precompiler/tests/test_utils.py b/static_precompiler/tests/test_utils.py index a46a6c6..a21ec79 100644 --- a/static_precompiler/tests/test_utils.py +++ b/static_precompiler/tests/test_utils.py @@ -5,9 +5,7 @@ from static_precompiler.compilers import CoffeeScript from static_precompiler.exceptions import CompilerNotFound, UnsupportedFile # noinspection PyProtectedMember -from static_precompiler.utils import (_build_compilers, compile_static, - compile_static_lazy, - get_compiler_by_name, +from static_precompiler.utils import (_build_compilers, compile_static, compile_static_lazy, get_compiler_by_name, get_compiler_by_path) diff --git a/static_precompiler/utils.py b/static_precompiler/utils.py index b4453b3..e8ed305 100644 --- a/static_precompiler/utils.py +++ b/static_precompiler/utils.py @@ -12,8 +12,7 @@ from django.utils.encoding import smart_bytes, smart_str from static_precompiler.exceptions import CompilerNotFound, UnsupportedFile -from static_precompiler.settings import (CACHE_NAME, COMPILERS, MTIME_DELAY, - POSIX_COMPATIBLE, STATIC_URL) +from static_precompiler.settings import CACHE_NAME, COMPILERS, MTIME_DELAY, POSIX_COMPATIBLE, STATIC_URL try: from importlib import import_module