mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-07 21:25:08 +00:00
[ty] Fix lint summary wording (#19091)
This commit is contained in:
parent
4e4e428a95
commit
4cf56d7ad4
2 changed files with 2 additions and 2 deletions
|
@ -307,7 +307,7 @@ declare_lint! {
|
||||||
/// d: bytes
|
/// d: bytes
|
||||||
/// ```
|
/// ```
|
||||||
pub(crate) static DUPLICATE_KW_ONLY = {
|
pub(crate) static DUPLICATE_KW_ONLY = {
|
||||||
summary: "detects dataclass definitions with more than once usages of `KW_ONLY`",
|
summary: "detects dataclass definitions with more than one usage of `KW_ONLY`",
|
||||||
status: LintStatus::preview("1.0.0"),
|
status: LintStatus::preview("1.0.0"),
|
||||||
default_level: Level::Error,
|
default_level: Level::Error,
|
||||||
}
|
}
|
||||||
|
|
2
ty.schema.json
generated
2
ty.schema.json
generated
|
@ -352,7 +352,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"duplicate-kw-only": {
|
"duplicate-kw-only": {
|
||||||
"title": "detects dataclass definitions with more than once usages of `KW_ONLY`",
|
"title": "detects dataclass definitions with more than one usage of `KW_ONLY`",
|
||||||
"description": "## What it does\nChecks for dataclass definitions with more than one field\nannotated with `KW_ONLY`.\n\n## Why is this bad?\n`dataclasses.KW_ONLY` is a special marker used to\nemulate the `*` syntax in normal signatures.\nIt can only be used once per dataclass.\n\nAttempting to annotate two different fields with\nit will lead to a runtime error.\n\n## Examples\n```python\nfrom dataclasses import dataclass, KW_ONLY\n\n@dataclass\nclass A: # Crash at runtime\n b: int\n _1: KW_ONLY\n c: str\n _2: KW_ONLY\n d: bytes\n```",
|
"description": "## What it does\nChecks for dataclass definitions with more than one field\nannotated with `KW_ONLY`.\n\n## Why is this bad?\n`dataclasses.KW_ONLY` is a special marker used to\nemulate the `*` syntax in normal signatures.\nIt can only be used once per dataclass.\n\nAttempting to annotate two different fields with\nit will lead to a runtime error.\n\n## Examples\n```python\nfrom dataclasses import dataclass, KW_ONLY\n\n@dataclass\nclass A: # Crash at runtime\n b: int\n _1: KW_ONLY\n c: str\n _2: KW_ONLY\n d: bytes\n```",
|
||||||
"default": "error",
|
"default": "error",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue