The following .pyi snippet is reported as error[unresolved-reference]: Name _WarnLog used when not defined:
_W_co = TypeVar("_W_co", bound=_WarnLog | None, default=_WarnLog | None, covariant=True)
# <snip>
_WarnLog: TypeAlias = list[warnings.WarningMessage]
source:
https://github.com/numpy/numtype/blob/eee4a2cac6ce3401308df497d868a4ba3be975cb/src/numpy-stubs/testing/_private/utils.pyi#L97-L102
Forward references like these should be allowed in .pyi stubs, and there should be no need for a from __future__ import annotations or manual stringification or something