(📚) fix docs for invalid-X-returns (#11094)
## Summary There is no class `integer` in python, nor is there a type `integer`, so I updated the docs to remove the backticks on these references, such that it is the representation of an integer, and not a reference.
This commit is contained in:
@@ -12,10 +12,10 @@ use ruff_text_size::Ranged;
|
||||
use crate::checkers::ast::Checker;
|
||||
|
||||
/// ## What it does
|
||||
/// Checks for `__hash__` implementations that return a type other than `integer`.
|
||||
/// Checks for `__hash__` implementations that return a value other than an integer.
|
||||
///
|
||||
/// ## Why is this bad?
|
||||
/// The `__hash__` method should return an `integer`. Returning a different
|
||||
/// The `__hash__` method should return an integer. Returning a different
|
||||
/// type may cause unexpected behavior.
|
||||
///
|
||||
/// Note: `bool` is a subclass of `int`, so it's technically valid for `__hash__` to
|
||||
|
||||
@@ -12,10 +12,10 @@ use ruff_text_size::Ranged;
|
||||
use crate::checkers::ast::Checker;
|
||||
|
||||
/// ## What it does
|
||||
/// Checks for `__index__` implementations that return a type other than `integer`.
|
||||
/// Checks for `__index__` implementations that return a value other than an integer.
|
||||
///
|
||||
/// ## Why is this bad?
|
||||
/// The `__index__` method should return an `integer`. Returning a different
|
||||
/// The `__index__` method should return an integer. Returning a different
|
||||
/// type may cause unexpected behavior.
|
||||
///
|
||||
/// Note: `bool` is a subclass of `int`, so it's technically valid for `__index__` to
|
||||
|
||||
@@ -13,10 +13,10 @@ use crate::checkers::ast::Checker;
|
||||
|
||||
/// ## What it does
|
||||
/// Checks for `__len__` implementations that return values other than a non-negative
|
||||
/// `integer`.
|
||||
/// integer.
|
||||
///
|
||||
/// ## Why is this bad?
|
||||
/// The `__len__` method should return a non-negative `integer`. Returning a different
|
||||
/// The `__len__` method should return a non-negative integer. Returning a different
|
||||
/// value may cause unexpected behavior.
|
||||
///
|
||||
/// Note: `bool` is a subclass of `int`, so it's technically valid for `__len__` to
|
||||
|
||||
Reference in New Issue
Block a user