typeshed
typeshed copied to clipboard
TypeDict and `Mapping[Any, object]` incompatibilities for `unittest.assertDictEqual`
I've just added types to the common dictionary used throughout my codebase. But now my assertDictEqual gives a type error:
Expected type 'Mapping[Any, object]', got 'MyDictTypeName' instead
What's the trick here? - Should I narrow the types with a Union?
Could you give a full example and the type checker (plus version) you are using? I just tried some examples with mypy 1.7.1 and that seemed to work.