Skip to content

Commit

Permalink
Simplify handling if missing arguments, let actual function call raise
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobiasd committed Dec 5, 2018
1 parent 2af4fcf commit 88b99e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="undictify",
version="0.4.2",
version="0.4.3",
author="Tobias Hermann",
author_email="[email protected]",
description="Type-checked function calls at runtime",
Expand Down
4 changes: 0 additions & 4 deletions undictify/_unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@ def _unpack_dict(func: WrappedOrFunc, # pylint: disable=too-many-arguments
if param.name not in data:
if _is_optional_type(param.annotation):
ctor_params[param.name] = None
elif param.default != inspect._empty:
pass
else:
raise TypeError(f'Key {param.name} is missing.')
else:
ctor_params[param.name] = _get_value(param.annotation,
data[param.name],
Expand Down

0 comments on commit 88b99e4

Please sign in to comment.