Repository navigation
Closed
Labels
decoratorstypecheckingusabilityUsability & 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 ActorHandle[T]:
"""Wrapper returned by the @remote decorator."""
def remote(self) -> T: ...
def options(self, num_cpus: int) -> "ActorHandle[T]": ...
def remote[T](cls: type[T]) -> ActorHandle[T]:
"""Decorator that replaces a class with an ActorHandle wrapper."""
return ActorHandle()
@remote
class Worker:
def compute(self) -> int:
return 42
# After decoration, Worker is ActorHandle[Worker], so .remote() is valid
Worker.remote() # pyrefly: Class `Worker` has no class attribute `remote`
Worker.options(num_cpus=2) # pyrefly: Class `Worker` has no class attribute `options`Today only Pyright actually accepts this kind of code. So low-pri.
Sandbox Link
(Only applicable for extension issues) IDE Information
No response
Metadata
Metadata
Assignees
Labels
decoratorstypecheckingusabilityUsability & readiness issues identified with running Pyrefly on top OSS projectsUsability & readiness issues identified with running Pyrefly on top OSS projects
Activity
asukaminato0721 commentedon May 29, 2026
claim
stroxler commentedon Oct 30, 2026
I'm closing this: it's a competing partial fix for the larger feature in #2294, which we want to get over the line instead