mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
Skip .pytype directory by default. (#2966)
Pytype stores .pyi files in .pytype that ruff shouldn’t check or touch.
This commit is contained in:
parent
a919041dda
commit
879512742f
3 changed files with 4 additions and 2 deletions
|
@ -282,6 +282,7 @@ exclude = [
|
||||||
".mypy_cache",
|
".mypy_cache",
|
||||||
".nox",
|
".nox",
|
||||||
".pants.d",
|
".pants.d",
|
||||||
|
".pytype",
|
||||||
".ruff_cache",
|
".ruff_cache",
|
||||||
".svn",
|
".svn",
|
||||||
".tox",
|
".tox",
|
||||||
|
@ -2211,7 +2212,7 @@ For more information on the glob syntax, refer to the [`globset` documentation](
|
||||||
Note that you'll typically want to use
|
Note that you'll typically want to use
|
||||||
[`extend-exclude`](#extend-exclude) to modify the excluded paths.
|
[`extend-exclude`](#extend-exclude) to modify the excluded paths.
|
||||||
|
|
||||||
**Default value**: `[".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]`
|
**Default value**: `[".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]`
|
||||||
|
|
||||||
**Type**: `list[str]`
|
**Type**: `list[str]`
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ pub static EXCLUDE: Lazy<Vec<FilePattern>> = Lazy::new(|| {
|
||||||
FilePattern::Builtin(".mypy_cache"),
|
FilePattern::Builtin(".mypy_cache"),
|
||||||
FilePattern::Builtin(".nox"),
|
FilePattern::Builtin(".nox"),
|
||||||
FilePattern::Builtin(".pants.d"),
|
FilePattern::Builtin(".pants.d"),
|
||||||
|
FilePattern::Builtin(".pytype"),
|
||||||
FilePattern::Builtin(".ruff_cache"),
|
FilePattern::Builtin(".ruff_cache"),
|
||||||
FilePattern::Builtin(".svn"),
|
FilePattern::Builtin(".svn"),
|
||||||
FilePattern::Builtin(".tox"),
|
FilePattern::Builtin(".tox"),
|
||||||
|
|
|
@ -70,7 +70,7 @@ pub struct Options {
|
||||||
/// default expression matches `_`, `__`, and `_var`, but not `_var_`.
|
/// default expression matches `_`, `__`, and `_var`, but not `_var_`.
|
||||||
pub dummy_variable_rgx: Option<String>,
|
pub dummy_variable_rgx: Option<String>,
|
||||||
#[option(
|
#[option(
|
||||||
default = r#"[".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]"#,
|
default = r#"[".bzr", ".direnv", ".eggs", ".git", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]"#,
|
||||||
value_type = "list[str]",
|
value_type = "list[str]",
|
||||||
example = r#"
|
example = r#"
|
||||||
exclude = [".venv"]
|
exclude = [".venv"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue