-
Notifications
You must be signed in to change notification settings - Fork 259
Open
Description
Describe the Bug
from abc import ABC
class A():
def foo(self, a: int, b:int, c:int):
raise NotImplementedError()
class B(A):
def foo(self):
x = 1
print(x)ERROR sandbox.py:15:9-12: Class member `B.foo` overrides parent class `A` in an inconsistent manner [[bad-override](https://pyrefly.org/en/docs/error-kinds/#bad-override)]
`B.foo` has type `BoundMethod[B, (self: B) -> None]`, which is not assignable to `BoundMethod[B, (self: B, a: int, b: int, c: int) -> Never]`, the type of `A.foo`
I want the error message to be
def foo(self, a: int, b:int, c:int):
------------------
|
-----------------------these not match
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Metadata
Metadata
Assignees
Labels
No labels