Skip to content

Allow highlighting decorators instead of function signatures #1958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions conformance/tests/classes_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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

Expand All @@ -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


Expand Down