diff --git a/CHANGELOG.md b/CHANGELOG.md index cd682949e..230444b88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Find out more about isort's release policy [here](https://pycqa.github.io/isort/ ### Unreleased - Removed `--old-finders` and `--magic-placement` flags and `old_finders` configuration option. The legacy finder logic that relied on environment introspection has been removed (#2445) @joao-faria-dev + - Update the `plone` profile to not clash with `black` (#2456) @ale-rt ### 6.1.0 October 1 2025 diff --git a/docs/configuration/profiles.md b/docs/configuration/profiles.md index c7b53062d..8db747831 100644 --- a/docs/configuration/profiles.md +++ b/docs/configuration/profiles.md @@ -52,11 +52,10 @@ To use any of the listed profiles, use `isort --profile PROFILE_NAME` from the c #plone +Based on black with these tweaks: - **force_alphabetical_sort**: `True` - **force_single_line**: `True` - - **lines_after_imports**: `2` - - **line_length**: `200` #attrs diff --git a/isort/profiles.py b/isort/profiles.py index f2f02437e..544f98b21 100644 --- a/isort/profiles.py +++ b/isort/profiles.py @@ -46,7 +46,6 @@ { "force_alphabetical_sort": True, "force_single_line": True, - "lines_after_imports": 2, } ) attrs = { diff --git a/tests/unit/profiles/test_plone.py b/tests/unit/profiles/test_plone.py index ecacc1528..ea0b68ddb 100644 --- a/tests/unit/profiles/test_plone.py +++ b/tests/unit/profiles/test_plone.py @@ -17,7 +17,6 @@ def test_plone_code_snippet_one(): import plone.app.multilingualindexes - PAMI_FIXTURE = PloneWithPackageLayer( bases=(PLONE_APP_MULTILINGUAL_PRESET_FIXTURE,), name="PAMILayer:Fixture", @@ -54,7 +53,6 @@ def test_plone_code_snippet_two(): from zope.component import queryAdapter from zope.globalrequest import getRequest - logger = getLogger(__name__) """ ) @@ -68,8 +66,39 @@ def test_plone_code_snippet_three(): import logging - logger = logging.getLogger(__name__) """ ) + + +def test_plone_code_snippet_four(): + plone_isort_test( + """# -*- coding: utf-8 -*- +from plone.app.querystring.interfaces import IQueryModifier +from zope.interface import provider + +import logging + + +def my_function(): + pass + +""" + ) + + +def test_plone_code_snippet_five(): + plone_isort_test( + """# -*- coding: utf-8 -*- +from plone.app.querystring.interfaces import IQueryModifier +from zope.interface import provider + +import logging + + +class MyClass: + pass + +""" + )