[ty] Fix lint summary wording (#19091)

This commit is contained in:
David Peter 2025-07-02 16:32:11 +02:00 committed by GitHub
parent 4e4e428a95
commit 4cf56d7ad4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -307,7 +307,7 @@ declare_lint! {
/// d: bytes
/// ```
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"),
default_level: Level::Error,
}

2
ty.schema.json generated
View file

@ -352,7 +352,7 @@
]
},
"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```",
"default": "error",
"oneOf": [