Skip to content

isort 7.0.0 is no longer compatible with black 26.1.0 #2452

@felixfontein

Description

@felixfontein

Black 26.1.0 got released earlier today, and adjusts some formatting related to imports.

Now if you format with both isort (in black mode) and black, each of the tools will change the other tool's output.

For example, isort:

--- a/noxfile.py
+++ b/noxfile.py
@@ -13,6 +13,7 @@ from pathlib import Path
 
 import nox
 
+
 try:
     import antsibull_nox
     import antsibull_nox.sessions

while black changes that back.

In another project, I also saw isort changing:

--- a/tests/unit/plugins/plugin_utils/test_inventory_filter.py
+++ b/tests/unit/plugins/plugin_utils/test_inventory_filter.py
@@ -4,6 +4,7 @@
 
 from __future__ import absolute_import, division, print_function
 
+
 __metaclass__ = type
 
 

while black changing that back.

There might be more differences, these are the ones I saw so far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions