-
Hi @lebrice I'm migrating over from pyrallis. One difference I'm noticing is that :
Is there any way to support (3)? (1) and (2) are minor and I'm happy to send a PR |
Beta Was this translation helpful? Give feedback.
Answered by
dlwh
Jun 21, 2023
Replies: 1 comment 1 reply
-
That is, I'd expect this test to pass, or have an option to pass: def test_unused_args_errors():
@dataclasses.dataclass
class Person:
name: str
age: int
with pytest.raises(ValueError):
get_decoding_fn(Person)({"name": "bob", "age": 10, "id": 42}) # type: ignore |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oh i see, you have to use
from_dict(Person, {"name": "bob", "age": 10, "id": 42}, drop_extra_fields=False)