You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring isort via pyproject.toml the settings were merged with those in ~/.isort.cfg. However when using a project-local .isort.cfg all global settings are ignored.
I've tested the following combinations with this command: isort --check-only --diff
The diff mentioned in the table below is this one splitting as imports onto a new line:
-from marshmallow import Schema as ValidationSchema, fields+from marshmallow import Schema as ValidationSchema+from marshmallow import fields
~/.isort.cfg
.isort.cfg
pyproject.toml
Produces Diff?
❌
✅
❌
✅
❌
❌
✅
✅
✅
✅
❌
✅
✅
❌
✅
❌
Since combine_as_imports is false by default, the unexpected output here is the fourth combination (~/.isort.cfg & pyproject.toml) which I would have expected to produce a diff since pyproject.toml doesn't have combine_as_imports = true set.
The text was updated successfully, but these errors were encountered:
Thank you for pointing this out! I was having issues getting black and isort to behave together, sure it was some unaddressed aspect of #694, but it was really just my old ~/.isort.cfg file causing compatibility issues.
This seems to be a problem with both pyproject.toml and setup.cfg. Using an .isort.cfg project file instead is a workaround for me.
When configuring isort via
pyproject.toml
the settings were merged with those in~/.isort.cfg
. However when using a project-local.isort.cfg
all global settings are ignored.For example, given a global
~/.isort.cfg
:a
pyproject.toml
:a project-local
.isort.cfg
:and a python file
foo.py
:I've tested the following combinations with this command:
isort --check-only --diff
The diff mentioned in the table below is this one splitting
as
imports onto a new line:Since
combine_as_imports
is false by default, the unexpected output here is the fourth combination (~/.isort.cfg
&pyproject.toml
) which I would have expected to produce a diff sincepyproject.toml
doesn't havecombine_as_imports = true
set.The text was updated successfully, but these errors were encountered: