mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
Remove repeated and erroneous scoped settings headers in docs (#8670)
Closes https://github.com/astral-sh/ruff/issues/8505.
This commit is contained in:
parent
bf2cc3f520
commit
f7d249ae06
4 changed files with 75 additions and 22 deletions
|
@ -834,9 +834,9 @@ pub struct LintCommonOptions {
|
|||
#[option(
|
||||
default = "{}",
|
||||
value_type = "dict[str, list[RuleSelector]]",
|
||||
scope = "per-file-ignores",
|
||||
example = r#"
|
||||
# Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`.
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"__init__.py" = ["E402"]
|
||||
"path/to/file.py" = ["E402"]
|
||||
"#
|
||||
|
@ -848,9 +848,9 @@ pub struct LintCommonOptions {
|
|||
#[option(
|
||||
default = "{}",
|
||||
value_type = "dict[str, list[RuleSelector]]",
|
||||
scope = "extend-per-file-ignores",
|
||||
example = r#"
|
||||
# Also ignore `E402` in all `__init__.py` files.
|
||||
[tool.ruff.lint.extend-per-file-ignores]
|
||||
"__init__.py" = ["E402"]
|
||||
"#
|
||||
)]
|
||||
|
@ -1205,8 +1205,8 @@ pub struct Flake8ImportConventionsOptions {
|
|||
#[option(
|
||||
default = r#"{"altair": "alt", "matplotlib": "mpl", "matplotlib.pyplot": "plt", "numpy": "np", "pandas": "pd", "seaborn": "sns", "tensorflow": "tf", "tkinter": "tk", "holoviews": "hv", "panel": "pn", "plotly.express": "px", "polars": "pl", "pyarrow": "pa"}"#,
|
||||
value_type = "dict[str, str]",
|
||||
scope = "aliases",
|
||||
example = r#"
|
||||
[tool.ruff.lint.flake8-import-conventions.aliases]
|
||||
# Declare the default aliases.
|
||||
altair = "alt"
|
||||
"matplotlib.pyplot" = "plt"
|
||||
|
@ -1223,8 +1223,8 @@ pub struct Flake8ImportConventionsOptions {
|
|||
#[option(
|
||||
default = r#"{}"#,
|
||||
value_type = "dict[str, str]",
|
||||
scope = "extend-aliases",
|
||||
example = r#"
|
||||
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
|
||||
# Declare a custom alias for the `matplotlib` module.
|
||||
"dask.dataframe" = "dd"
|
||||
"#
|
||||
|
@ -1235,8 +1235,8 @@ pub struct Flake8ImportConventionsOptions {
|
|||
#[option(
|
||||
default = r#"{}"#,
|
||||
value_type = "dict[str, list[str]]",
|
||||
scope = "banned-aliases",
|
||||
example = r#"
|
||||
[tool.ruff.lint.flake8-import-conventions.banned-aliases]
|
||||
# Declare the banned aliases.
|
||||
"tensorflow.keras.backend" = ["K"]
|
||||
"#
|
||||
|
@ -1548,8 +1548,8 @@ pub struct Flake8TidyImportsOptions {
|
|||
#[option(
|
||||
default = r#"{}"#,
|
||||
value_type = r#"dict[str, { "msg": str }]"#,
|
||||
scope = "banned-api",
|
||||
example = r#"
|
||||
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
||||
"cgi".msg = "The cgi module is deprecated, see https://peps.python.org/pep-0594/#cgi."
|
||||
"typing.TypedDict".msg = "Use typing_extensions.TypedDict instead."
|
||||
"#
|
||||
|
@ -2000,9 +2000,9 @@ pub struct IsortOptions {
|
|||
#[option(
|
||||
default = "{}",
|
||||
value_type = "dict[str, list[str]]",
|
||||
scope = "sections",
|
||||
example = r#"
|
||||
# Group all Django imports into a separate section.
|
||||
[tool.ruff.lint.isort.sections]
|
||||
"django" = ["django"]
|
||||
"#
|
||||
)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue