Skip to content

Commit

Permalink
fixed isort errors
Browse files Browse the repository at this point in the history
- sorting inside project files
- configuration of sections (removed LIB since it is not defined as "known")
- changes for isort 5:
  - removed deprecated "-rc" (recursive is done by default now)
  - "-df" -> "--df"
  • Loading branch information
wfehr committed Feb 27, 2024
1 parent 0fc9b1a commit 5908d8a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: isort
run: isort -c -rc -df djangocms_transfer
run: isort --check-only --df djangocms_transfer
2 changes: 1 addition & 1 deletion djangocms_transfer/datastructures.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import namedtuple

from django.core.serializers import deserialize
from django.conf import settings
from django.core.serializers import deserialize
from django.db import transaction
from django.utils.encoding import force_str
from django.utils.functional import cached_property
Expand Down
2 changes: 1 addition & 1 deletion djangocms_transfer/helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from collections import defaultdict

from django.core import serializers
from django.conf import settings
from django.core import serializers

from . import get_serializer_name
from .utils import get_plugin_fields, get_plugin_model
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
known_first_party = djangocms_transfer
known_cms = cms, menus
known_django = django
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = THIRDPARTY
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LIB, LOCALFOLDER
sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
known_first_party = djangocms_transfer
known_cms = cms, menus
known_django = django
Expand Down Expand Up @@ -63,7 +63,7 @@ commands = flake8 djangocms_transfer

[testenv:isort]
deps = isort
commands = isort -c -rc -df djangocms_transfer
commands = isort -c --df djangocms_transfer
skip_install = true

[testenv:black]
Expand Down

0 comments on commit 5908d8a

Please sign in to comment.