Skip to content

Commit

Permalink
fixup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Apr 2, 2024
1 parent 3b9e0ec commit 5df97bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit 5df97bc

Please sign in to comment.