Skip to content

Commit edf83f3

Browse files
authored
Fix isort skip config (#13849)
Our current isort config doesn't fully work for the pre-commit hook. Whereas in tox isort is called with the global `.` path, pre-commit passes all filenames individually. E.g. running this command will also reformat the `mypy/typeshed` directory: ``` pre-commit run isort --all-files ``` Using `skip_glob` instead of `skip` will resolve the issue. https://pycqa.github.io/isort/docs/configuration/options.html#skip-glob Followup to #13832 (comment) /CC: @hauntsaninja
1 parent 1fbbe91 commit edf83f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pyproject.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ line_length = 99
3333
combine_as_imports = true
3434
skip_gitignore = true
3535
extra_standard_library = ["typing_extensions"]
36-
skip = [
37-
"mypy/typeshed",
38-
"mypyc/test-data",
39-
"test-data",
36+
skip_glob = [
37+
"mypy/typeshed/*",
38+
"mypyc/test-data/*",
39+
"test-data/*",
4040
]

0 commit comments

Comments
 (0)