To repro, run mypy on the following: ```python print(__annotations__) ``` ``` test.py:1: error: Name '__annotations__' is not defined Found 1 error in 1 file (checked 1 source file) ``` A pyright user recently noted [the same issue in pyright](https://github.com/microsoft/pylance-release/issues/1161), which I have fixed.