From 9a45b49ed05e29fc4ef9b941ffc4abb0437abee2 Mon Sep 17 00:00:00 2001 From: "Aleksandr.Govenko" Date: Tue, 1 Apr 2025 10:38:11 +0200 Subject: [PATCH] Allow highlighting decorators instead of function signatures --- conformance/tests/classes_override.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/conformance/tests/classes_override.py b/conformance/tests/classes_override.py index 8565ad738..2f3147d2c 100644 --- a/conformance/tests/classes_override.py +++ b/conformance/tests/classes_override.py @@ -49,8 +49,8 @@ def method2(self, x: str) -> str: def method2(self, x: int | str) -> int | str: # OK return 0 - @override - def method3(self) -> int: # E: no matching signature in ancestor + @override # E[method3] + def method3(self) -> int: # E[method3]: no matching signature in ancestor return 1 @overload # E[method4] @@ -61,7 +61,7 @@ def method4(self, x: int) -> int: def method4(self, x: str) -> str: ... - @override + @override # E[method4] def method4(self, x: int | str) -> int | str: # E[method4]: no matching signature in ancestor return 0 @@ -75,18 +75,18 @@ def method5(self): # OK # > only normal methods but also @property, @staticmethod, and @classmethod. @staticmethod - @override - def static_method1() -> int: # E: no matching signature in ancestor + @override # E[static_method1] + def static_method1() -> int: # E[static_method1]: no matching signature in ancestor return 1 @classmethod - @override - def class_method1(cls) -> int: # E: no matching signature in ancestor + @override # E[class_method1] + def class_method1(cls) -> int: # E[class_method1]: no matching signature in ancestor return 1 @property - @override - def property1(self) -> int: # E: no matching signature in ancestor + @override # E[property1] + def property1(self) -> int: # E[property1]: no matching signature in ancestor return 1