mirror of https://github.com/astral-sh/ruff
[ty] Fix override of final method summary (#21681)
This commit is contained in:
parent
0084e94f78
commit
b5b4917d7f
|
|
@ -1636,7 +1636,7 @@ declare_lint! {
|
|||
/// def foo(self): ... # Error raised here
|
||||
/// ```
|
||||
pub(crate) static OVERRIDE_OF_FINAL_METHOD = {
|
||||
summary: "detects subclasses of final classes",
|
||||
summary: "detects overrides of final methods",
|
||||
status: LintStatus::stable("0.0.1-alpha.29"),
|
||||
default_level: Level::Error,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -864,7 +864,7 @@
|
|||
]
|
||||
},
|
||||
"override-of-final-method": {
|
||||
"title": "detects subclasses of final classes",
|
||||
"title": "detects overrides of final methods",
|
||||
"description": "## What it does\nChecks for methods on subclasses that override superclass methods decorated with `@final`.\n\n## Why is this bad?\nDecorating a method with `@final` declares to the type checker that it should not be\noverridden on any subclass.\n\n## Example\n\n```python\nfrom typing import final\n\nclass A:\n @final\n def foo(self): ...\n\nclass B(A):\n def foo(self): ... # Error raised here\n```",
|
||||
"default": "error",
|
||||
"oneOf": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue