Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

mypy insufficiently strict?

Open fdmalone opened this issue 1 year ago • 2 comments

#1345 fixed a bug with PrepareIdentity being constructed with a tuple of QDTypes when it expects a Tuple of Registers. It's surprising mypy didn't catch this. The issue is to figure out why this was allowed.

fdmalone avatar Aug 27 '24 16:08 fdmalone

some reference docs: https://www.attrs.org/en/stable/types.html

could it be because sometimes the fields use field() and sometimes use type annotations?

mpharrigan avatar Aug 27 '24 21:08 mpharrigan

maybe missing the "type" argument to field?

fdmalone avatar Aug 27 '24 21:08 fdmalone