What's Changed
* feat: raise `UndefinedKey` exception on user decision by FelixTheC in https://github.com/FelixTheC/strongtyping/pull/130
- new exception type `UndefinedKey`
- new allowed parameter(`throw_on_undefined`) for `match_class_typing` which will be thrown if you try to init a TypeDict with an unspecified attribute/key
- test case example:
python
def test_new_parameter():
match_class_typing(throw_on_undefined=True)
class User(TypedDict):
id: str
username: str
description: str | None
with pytest.raises(UndefinedKey):
User({"id": "0123", "username": "test", "description": None, "age": 10})
**Full Changelog**: https://github.com/FelixTheC/strongtyping/compare/v3.12.0...v3.12.1