Skip .pytype directory by default. (#2966)

Pytype stores .pyi files in .pytype that ruff shouldn’t check or touch.
This commit is contained in:
Manuel Jacob 2023-02-16 20:38:08 +01:00 committed by GitHub
parent a919041dda
commit 879512742f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -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]`

View file

@ -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"),

View file

@ -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"]