-
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 Server:
def __init__(self, name: str) -> None:
Server.instance = self
Server.server_name = name
s = Server("main")
current: "Server" = Server.instance # FP: no class attribute `instance`
label: str = Server.server_name # FP: no class attribute `server_name`Only Pyright choose to support this though. Mypy and Ty both get confused as well. So this is low-pri.
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