-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Labels
typecheckingusabilityUsability & readiness issues identified with running Pyrefly on top OSS projectsUsability & readiness issues identified with running Pyrefly on top OSS projects
Description
Describe the Bug
Minimal repro:
class ConditionBase:
def __and__(self, other: object) -> "And":
return And()
def __or__(self, other: object) -> "Or":
return Or()
class AttributeBase:
def __and__(self, value: object) -> "And":
return And()
def __or__(self, value: object) -> "Or":
return Or()
class And:
pass
class Or:
pass
class ConditionAttributeBase( # FP: inconsistent-inheritance (__and__ and __or__)
ConditionBase,
AttributeBase,
):
passThis is actually a name-only mismatch. For bad-override, we have a different error code for naming-only issues (which gets suppressed by default). We might want to do the same here as well given that no other type checker choose to flag this code.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
typecheckingusabilityUsability & readiness issues identified with running Pyrefly on top OSS projectsUsability & readiness issues identified with running Pyrefly on top OSS projects