You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current typing tests are executed via pytest which calls string-based checks for mypy and pyright.
I propose using the correct way: typing.assert_type tests.
It will allow to use: per-checker ignore comments, common API that all devs can easily understand, stricter checks.
So, instead:
defcheck_msgpack_Decoder_decode_typed() ->None:
dec=msgspec.msgpack.Decoder(list[int])
b=msgspec.msgpack.encode([1, 2, 3])
o=dec.decode(b)
reveal_type(dec) # assert "Decoder" in typ and "list" in typ and "int" in typreveal_type(o) # assert "list" in typ and "int" in typ
This is done. The typing tests now use typing.assert_type instead of the old string-based reveal_type checks (#1063), with stricter checks (#1064), and run across mypy, pyright, and pyrefly (#1070), all on top of #1041. Closing as completed, thanks for driving this @sobolevn.
Activity
Siyet commentedon Jun 15, 2026
This is done. The typing tests now use
typing.assert_typeinstead of the old string-basedreveal_typechecks (#1063), with stricter checks (#1064), and run across mypy, pyright, and pyrefly (#1070), all on top of #1041. Closing as completed, thanks for driving this @sobolevn.