-
Notifications
You must be signed in to change notification settings - Fork 283
Closed
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:
# Pyrefly reports "Class member X overrides parent class Y in an inconsistent
# manner -- Got parameter name A, expected B" even when the parameters are
# positional-only in the parent class (so the name does not matter for
# Liskov substitution).
# --------------------------------------------------------------------------
# In typeshed, Sequence.__contains__ is:
# def __contains__(self, value: object, /) -> bool: ...
# The `/` makes `value` positional-only, so renaming it to `item` is fine.
# --------------------------------------------------------------------------
from typing import Sequence
class RouteTable(Sequence[str]):
# pyrefly FP: Got parameter name `item`, expected `value`
def __contains__(self, item: object) -> bool: ...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