Let's say you have a tree like this:
+ SomeFolder
+- pyproject.toml
+- directory
+- subdirectory
+- file.py
With contents of the files:
[tool.isort]
skip = [
"directory/subdirectory"
]
filter_files = true
directory/subdirectory/file.py
import os
import collections
When using a command isort directory\subdirectory\file.py, the file directory/subdirectory/file.py gets fixed by isort.
If you change directory/subdirectory in pyproject.toml to be just directory, isort does not touch the directory/subdirectory/file.py, but I was unable to get isort to ignore directory/subdirectory.
As a workaround, you can use skip_glob with directory/subdirectory/* pattern, but it does seem like a bug to me, considering that this work fine for top-level directories.
Let's say you have a tree like this:
With contents of the files:
pyproject.tomldirectory/subdirectory/file.pyWhen using a command
isort directory\subdirectory\file.py, the filedirectory/subdirectory/file.pygets fixed by isort.If you change
directory/subdirectoryinpyproject.tomlto be justdirectory, isort does not touch thedirectory/subdirectory/file.py, but I was unable to get isort to ignoredirectory/subdirectory.As a workaround, you can use
skip_globwithdirectory/subdirectory/*pattern, but it does seem like a bug to me, considering that this work fine for top-level directories.