Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more docs about filter-files option #2074

Merged
merged 1 commit into from Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/configuration/options.md
Expand Up @@ -57,7 +57,7 @@ Force specific imports to the top of their appropriate section.

## Skip

Files that isort should skip over. If you want to skip multiple files you should specify twice: --skip file1 --skip file2. Values can be file names, directory names or file paths. To skip all files in a nested path use --skip-glob.
Files that isort should skip over. If you want to skip multiple files you should specify twice: `--skip file1 --skip file2`. Values can be file names, directory names or file paths. To skip all files in a nested path, use [`--skip-glob`](#skip-glob). To even skip matching files that have been specified on the command line, use [`--filter-files`](#filter-files).

**Type:** List of Strings
**Default:** `('.bzr', '.direnv', '.eggs', '.git', '.hg', '.mypy_cache', '.nox', '.pants.d', '.svn', '.tox', '.venv', '__pypackages__', '_build', 'buck-out', 'build', 'dist', 'node_modules', 'venv')`
Expand Down Expand Up @@ -87,7 +87,7 @@ skip = [".gitignore", ".dockerignore"]

## Extend Skip

Extends --skip to add additional files that isort should skip over. If you want to skip multiple files you should specify twice: --skip file1 --skip file2. Values can be file names, directory names or file paths. To skip all files in a nested path use --skip-glob.
Extends --skip to add additional files that isort should skip over. If you want to skip multiple files you should specify twice: --skip file1 --skip file2. Values can be file names, directory names or file paths. To skip all files in a nested path, use [`--skip-glob`](#skip-glob). To even skip matching files that have been specified on the command line, use [`--filter-files`](#filter-files).

**Type:** List of Strings
**Default:** `frozenset()`
Expand Down Expand Up @@ -116,7 +116,7 @@ extend_skip = [".md", ".json"]

## Skip Glob

Files that isort should skip over.
Files that isort should skip over. To even skip matching files that have been specified on the command line, use [`--filter-files`](#filter-files).

**Type:** List of Strings
**Default:** `frozenset()`
Expand Down Expand Up @@ -147,7 +147,7 @@ skip_glob = ["docs/*"]

## Extend Skip Glob

Additional files that isort should skip over (extending --skip-glob).
Additional files that isort should skip over (extending --skip-glob). To even skip matching files that have been specified on the command line, use [`--filter-files`](#filter-files).

**Type:** List of Strings
**Default:** `frozenset()`
Expand Down Expand Up @@ -177,7 +177,8 @@ extend_skip_glob = ["my_*_module.py", "test/*"]

## Skip Gitignore

Treat project as a git repository and ignore files listed in .gitignore.
Treat project as a git repository and ignore files listed in .gitignore. To even skip matching files that have been specified on the command line, use [`--filter-files`](#filter-files).

NOTE: This requires git to be installed and accessible from the same shell as isort.

**Type:** Bool
Expand Down