From 5df97bc218514802277fa70f65d2edce2dbdf2c8 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 2 Apr 2024 17:37:41 +0100 Subject: [PATCH] fixup docs --- .../src/rules/pylint/rules/singledispatch_method.rs | 4 ++-- .../rules/pylint/rules/singledispatchmethod_function.rs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/ruff_linter/src/rules/pylint/rules/singledispatch_method.rs b/crates/ruff_linter/src/rules/pylint/rules/singledispatch_method.rs index 50121a7902875..17c24e1a1962f 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/singledispatch_method.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/singledispatch_method.rs @@ -9,13 +9,13 @@ use crate::checkers::ast::Checker; use crate::importer::ImportRequest; /// ## What it does -/// Checks for `@singledispatch` decorators on class and instance methods. +/// Checks for methods decorated with `@singledispatch`. /// /// ## Why is this bad? /// The `@singledispatch` decorator is intended for use with functions, not methods. /// /// Instead, use the `@singledispatchmethod` decorator, or migrate the method to a -/// standalone function or `@staticmethod`. +/// standalone function. /// /// ## Example /// ```python diff --git a/crates/ruff_linter/src/rules/pylint/rules/singledispatchmethod_function.rs b/crates/ruff_linter/src/rules/pylint/rules/singledispatchmethod_function.rs index a4d9a7be9191e..98a05582eb045 100644 --- a/crates/ruff_linter/src/rules/pylint/rules/singledispatchmethod_function.rs +++ b/crates/ruff_linter/src/rules/pylint/rules/singledispatchmethod_function.rs @@ -9,12 +9,11 @@ use crate::checkers::ast::Checker; use crate::importer::ImportRequest; /// ## What it does -/// Checks for `@singledispatchmethod` decorators on functions or static -/// methods. +/// Checks for non-method functions decorated with `@singledispatchmethod`. /// /// ## Why is this bad? -/// The `@singledispatchmethod` decorator is intended for use with class and -/// instance methods, not functions. +/// The `@singledispatchmethod` decorator is intended for use with methods, not +/// functions. /// /// Instead, use the `@singledispatch` decorator. ///