Skip to content

Commit

Permalink
Fix isort skip config (#13849)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cdce8p authored Oct 9, 2022
1 parent 1fbbe91 commit edf83f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ line_length = 99
combine_as_imports = true
skip_gitignore = true
extra_standard_library = ["typing_extensions"]
skip = [
"mypy/typeshed",
"mypyc/test-data",
"test-data",
skip_glob = [
"mypy/typeshed/*",
"mypyc/test-data/*",
"test-data/*",
]

0 comments on commit edf83f3

Please sign in to comment.