Created
December 27, 2025 06:32
-
-
Save mypy-play/93bea1b2fbda6206d83d7b4e9fb7c5e9 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A: | |
| import math | |
| def __new__(cls) -> "A": | |
| reveal_type(cls.math.pi) # N: Revealed type is "types.ModuleType" | |
| return cls() | |
| def pos_or_named_self(self) -> None: | |
| reveal_type(self.math.pi) # N: Revealed type is "types.ModuleType" | |
| def pos_only_self(self, /) -> None: | |
| reveal_type(self.math.pi) # N: Revealed type is "types.ModuleType" | |
| @classmethod | |
| def clsmethod(cls) -> None: | |
| reveal_type(cls.math.pi) # N: Revealed type is "types.ModuleType" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment