4 ms·
There is actually an escape hatch you can use, although it is a bit clunky: ```py from typing import TYPE_CHECKING if TYPE_CHECKING: Foo =
by probablyrobert 5y ago
There is actually an escape hatch you can use, although it is a bit clunky:
```py
from typing import TYPE_CHECKING
if TYPE_CHECKING:
Foo = "expression that mypy can understand"
else:
Foo = "dynamic expression"
```
- samwillis 5y agoSomehow in all my searching the other day I missed that, thanks!