Add .git-rewrite folder to default ignored folder paths (#4261)

This commit is contained in:
Jerome Leclanche
2023-05-07 04:40:38 +02:00
committed by GitHub
parent e66fdb83d0
commit 5ac2c7d293
4 changed files with 5 additions and 2 deletions

View File

@@ -183,6 +183,7 @@ exclude = [
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",

View File

@@ -38,6 +38,7 @@ pub static EXCLUDE: Lazy<Vec<FilePattern>> = Lazy::new(|| {
FilePattern::Builtin(".direnv"),
FilePattern::Builtin(".eggs"),
FilePattern::Builtin(".git"),
FilePattern::Builtin(".git-rewrite"),
FilePattern::Builtin(".hg"),
FilePattern::Builtin(".mypy_cache"),
FilePattern::Builtin(".nox"),

View File

@@ -71,7 +71,7 @@ pub struct Options {
/// default expression matches `_`, `__`, and `_var`, but not `_var_`.
pub dummy_variable_rgx: Option<String>,
#[option(
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"]"#,
default = r#"[".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".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]",
example = r#"
exclude = [".venv"]

View File

@@ -25,6 +25,7 @@ exclude = [
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
@@ -303,7 +304,7 @@ extend = "../pyproject.toml"
line-length = 100
```
All of the above rules apply equivalently to `ruff.toml` and `.ruff.toml` files. If Ruff detects
All of the above rules apply equivalently to `ruff.toml` and `.ruff.toml` files. If Ruff detects
multiple configuration files in the same directory, the `.ruff.toml` file will take precedence over
the `ruff.toml` file, and the `ruff.toml` file will take precedence over the `pyproject.toml` file.