Skip to content

Instantly share code, notes, and snippets.

@mypy-play
Created January 14, 2026 19:39
Show Gist options
  • Select an option

  • Save mypy-play/b24cddd715787ec9afbc47054d29c49c to your computer and use it in GitHub Desktop.

Select an option

Save mypy-play/b24cddd715787ec9afbc47054d29c49c to your computer and use it in GitHub Desktop.
Shared via mypy Playground
from functools import cached_property
class Foo:
def awesome(self):
...
class Bar:
@cached_property
def client(self) -> Foo:
return Foo()
def foo(self):
reveal_type(self.client)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment