We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95cd47a commit 45ff8ebCopy full SHA for 45ff8eb
injector/__init__.py
@@ -1355,9 +1355,8 @@ def _recreate_annotated_origin(annotated_type: Any) -> Any:
1355
if only_explicit_bindings and _inject_marker not in metadata or _noinject_marker in metadata:
1356
del bindings[k]
1357
elif _is_specialization(v, Union) or _is_new_union_type(v):
1358
- # We don't treat Optional parameters in any special way at the moment.
1359
union_members = v.__args__
1360
- new_members = tuple(set(union_members) - {type(None)})
+ new_members = tuple(set(union_members))
1361
# mypy stared complaining about this line for some reason:
1362
# error: Variable "new_members" is not valid as a type
1363
new_union = Union[new_members] # type: ignore
0 commit comments