mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 10:01:15 +00:00
Add site-packages to default exclusions (#9188)
Suggested in https://github.com/astral-sh/ruff-vscode/issues/232#issuecomment-1860788600. This is technically a non-backwards-compatible change, but I would be very surprised if it affected anyone in practice given that `site-packages` is always ignored already in virtual environments.
This commit is contained in:
parent
a7514295c1
commit
c97d3ddafb
4 changed files with 53 additions and 0 deletions
|
@ -1,5 +1,42 @@
|
||||||
# Breaking Changes
|
# Breaking Changes
|
||||||
|
|
||||||
|
## 0.1.9
|
||||||
|
|
||||||
|
### `site-packages` is now excluded by default ([#5513](https://github.com/astral-sh/ruff/pull/5513))
|
||||||
|
|
||||||
|
Ruff maintains a list of default exclusions, which now consists of the following patterns:
|
||||||
|
|
||||||
|
- `.bzr`
|
||||||
|
- `.direnv`
|
||||||
|
- `.eggs`
|
||||||
|
- `.git-rewrite`
|
||||||
|
- `.git`
|
||||||
|
- `.hg`
|
||||||
|
- `.ipynb_checkpoints`
|
||||||
|
- `.mypy_cache`
|
||||||
|
- `.nox`
|
||||||
|
- `.pants.d`
|
||||||
|
- `.pyenv`
|
||||||
|
- `.pytest_cache`
|
||||||
|
- `.pytype`
|
||||||
|
- `.ruff_cache`
|
||||||
|
- `.svn`
|
||||||
|
- `.tox`
|
||||||
|
- `.venv`
|
||||||
|
- `.vscode`
|
||||||
|
- `__pypackages__`
|
||||||
|
- `_build`
|
||||||
|
- `buck-out`
|
||||||
|
- `build`
|
||||||
|
- `dist`
|
||||||
|
- `node_modules`
|
||||||
|
- `site-packages`
|
||||||
|
- `venv`
|
||||||
|
|
||||||
|
Previously, the `site-packages` directory was not excluded by default. While `site-packages` tends
|
||||||
|
to be excluded anyway by virtue of the `.venv` exclusion, this may not be the case when using Ruff
|
||||||
|
from VS Code outside a virtual environment.
|
||||||
|
|
||||||
## 0.1.0
|
## 0.1.0
|
||||||
|
|
||||||
### The deprecated `format` setting has been removed
|
### The deprecated `format` setting has been removed
|
||||||
|
|
|
@ -194,20 +194,25 @@ exclude = [
|
||||||
".git",
|
".git",
|
||||||
".git-rewrite",
|
".git-rewrite",
|
||||||
".hg",
|
".hg",
|
||||||
|
".ipynb_checkpoints",
|
||||||
".mypy_cache",
|
".mypy_cache",
|
||||||
".nox",
|
".nox",
|
||||||
".pants.d",
|
".pants.d",
|
||||||
|
".pyenv",
|
||||||
|
".pytest_cache",
|
||||||
".pytype",
|
".pytype",
|
||||||
".ruff_cache",
|
".ruff_cache",
|
||||||
".svn",
|
".svn",
|
||||||
".tox",
|
".tox",
|
||||||
".venv",
|
".venv",
|
||||||
|
".vscode",
|
||||||
"__pypackages__",
|
"__pypackages__",
|
||||||
"_build",
|
"_build",
|
||||||
"buck-out",
|
"buck-out",
|
||||||
"build",
|
"build",
|
||||||
"dist",
|
"dist",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
"site-packages",
|
||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ pub(crate) static EXCLUDE: &[FilePattern] = &[
|
||||||
FilePattern::Builtin("build"),
|
FilePattern::Builtin("build"),
|
||||||
FilePattern::Builtin("dist"),
|
FilePattern::Builtin("dist"),
|
||||||
FilePattern::Builtin("node_modules"),
|
FilePattern::Builtin("node_modules"),
|
||||||
|
FilePattern::Builtin("site-packages"),
|
||||||
FilePattern::Builtin("venv"),
|
FilePattern::Builtin("venv"),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -21,20 +21,25 @@ If left unspecified, Ruff's default configuration is equivalent to:
|
||||||
".git",
|
".git",
|
||||||
".git-rewrite",
|
".git-rewrite",
|
||||||
".hg",
|
".hg",
|
||||||
|
".ipynb_checkpoints",
|
||||||
".mypy_cache",
|
".mypy_cache",
|
||||||
".nox",
|
".nox",
|
||||||
".pants.d",
|
".pants.d",
|
||||||
|
".pyenv",
|
||||||
|
".pytest_cache",
|
||||||
".pytype",
|
".pytype",
|
||||||
".ruff_cache",
|
".ruff_cache",
|
||||||
".svn",
|
".svn",
|
||||||
".tox",
|
".tox",
|
||||||
".venv",
|
".venv",
|
||||||
|
".vscode",
|
||||||
"__pypackages__",
|
"__pypackages__",
|
||||||
"_build",
|
"_build",
|
||||||
"buck-out",
|
"buck-out",
|
||||||
"build",
|
"build",
|
||||||
"dist",
|
"dist",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
"site-packages",
|
||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -98,20 +103,25 @@ If left unspecified, Ruff's default configuration is equivalent to:
|
||||||
".git",
|
".git",
|
||||||
".git-rewrite",
|
".git-rewrite",
|
||||||
".hg",
|
".hg",
|
||||||
|
".ipynb_checkpoints",
|
||||||
".mypy_cache",
|
".mypy_cache",
|
||||||
".nox",
|
".nox",
|
||||||
".pants.d",
|
".pants.d",
|
||||||
|
".pyenv",
|
||||||
|
".pytest_cache",
|
||||||
".pytype",
|
".pytype",
|
||||||
".ruff_cache",
|
".ruff_cache",
|
||||||
".svn",
|
".svn",
|
||||||
".tox",
|
".tox",
|
||||||
".venv",
|
".venv",
|
||||||
|
".vscode",
|
||||||
"__pypackages__",
|
"__pypackages__",
|
||||||
"_build",
|
"_build",
|
||||||
"buck-out",
|
"buck-out",
|
||||||
"build",
|
"build",
|
||||||
"dist",
|
"dist",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
"site-packages",
|
||||||
"venv",
|
"venv",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue