mirror of https://github.com/astral-sh/ruff
[`flake8-annotations`] Make `ANN401` example error out-of-the-box (#18974)
This commit is contained in:
parent
85b2a08b5c
commit
e5e3d998c5
|
|
@ -476,12 +476,18 @@ impl Violation for MissingReturnTypeClassMethod {
|
||||||
/// ## Example
|
/// ## Example
|
||||||
///
|
///
|
||||||
/// ```python
|
/// ```python
|
||||||
|
/// from typing import Any
|
||||||
|
///
|
||||||
|
///
|
||||||
/// def foo(x: Any): ...
|
/// def foo(x: Any): ...
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// Use instead:
|
/// Use instead:
|
||||||
///
|
///
|
||||||
/// ```python
|
/// ```python
|
||||||
|
/// from typing import Any
|
||||||
|
///
|
||||||
|
///
|
||||||
/// def foo(x: int): ...
|
/// def foo(x: int): ...
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue