[ty] Fix override of final method summary (#21681)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
2
ty.schema.json
generated
2
ty.schema.json
generated
@@ -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": [
|
||||
|
||||
Reference in New Issue
Block a user