From 4cf56d7ad49fdae8aabd6500e15be9516056342d Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 2 Jul 2025 16:32:11 +0200 Subject: [PATCH] [ty] Fix lint summary wording (#19091) --- crates/ty_python_semantic/src/types/diagnostic.rs | 2 +- ty.schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ty_python_semantic/src/types/diagnostic.rs b/crates/ty_python_semantic/src/types/diagnostic.rs index 5e0ba48b79..efaa226a54 100644 --- a/crates/ty_python_semantic/src/types/diagnostic.rs +++ b/crates/ty_python_semantic/src/types/diagnostic.rs @@ -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, } diff --git a/ty.schema.json b/ty.schema.json index 3c896cb48d..b965b73434 100644 --- a/ty.schema.json +++ b/ty.schema.json @@ -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": [