Skip to content

Upgrade mypy to 0.942 to fix support of types-psycopg2 >= 2.9.12

types-psycopg2 2.9.12 contains this commit: https://github.com/python/typeshed/commit/506be4fb0adcf38af77325258af337772abcde77

which removes Any as the return type of the last variant, allowing mypy to type-check the returned value. However, mypy 0.920 only considers the last variant, even though we use the first one; causing the return type to be badly inferred, and erroring every time we use it as context manager.


Migrated from D7641 (view on Phabricator)

Merge request reports