You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classActorHandle[T]:
"""Wrapper returned by the @remote decorator."""defremote(self) ->T: ...
defoptions(self, num_cpus: int) ->"ActorHandle[T]": ...
defremote[T](cls: type[T]) ->ActorHandle[T]:
"""Decorator that replaces a class with an ActorHandle wrapper."""returnActorHandle()
@remoteclassWorker:
defcompute(self) ->int:
return42# After decoration, Worker is ActorHandle[Worker], so .remote() is validWorker.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.
Describe the Bug
Minimal repro:
Today only Pyright actually accepts this kind of code. So low-pri.
Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxlKnHAAQCClALrgE4ASGmsA2gBUAuogA66epPqiQMmQHV2qYsRjt67GCwCu7dDEz1speiwAWMegAFNAW1wtLmGJQ6o27QnNmyJU52AaMPaOABRwMFBgAJT0ALQAfPQCiPSE6eJS9AH0uMQsELjocOGRYAA09OjatgD6lMTacKkQ6CyxidIgzB7cWPzCMqnpXujiOXYOMIJCodTNpqSqMx1JPRx9vNPCYn6S3jIAIi5uHqZm7kHENJTw9Kj01LQMAO4Q5vcS61w8sPQvShUai8PjkeyCOj0TFYG1%2BMFC0XE4hswSm4iedHo8g4AGs1LssjlXLZGmEIlFVvRWiwCVkpJpIRIACwAJiR6AAxEwwI51M5XEoCkVKtj2Hj1BAGN9NvxReKhJU4Lg0pMwrFJfQAG6oKAQTDiOXA1Xw2L0LlkTRgKCkVIAYRomIABob2I76BcGOhlRiGO4WOwINhtI56I7jY6DbjgXkhcVQtU6g0mgBeFmm82kS3Wu0OhjOqOu920Kre3P3Fj%2BwPByyOmOFYqOkDlEDB6BwEjkRAgLkAVQKupYJjA2nQrHrcHZOTAHFs7lqCewalC%2BBabUpcH9tMkDN0EjAMgAcjVF%2BxUsB8ABfMFNkAWmBW0iENi2KAULkABUz9%2Bt9DQWDw%2BCPEUkAAOa6O49ajFyADKMCWGYFbEM0AD0yF3g%2BhAcCByEwOgyGYLglBwMhrjoKB4Gxsh9DTuoqDatAqDYH8pHkYK9a5Pk46jGQ5hFHEmpqHA7HJl0ADMhAAIxsr4IAXs2qBjgJABi0AwBQf44AQHayUAA
(Only applicable for extension issues) IDE Information
No response