Skip to content

Commit d01733b

Browse files
✨ Feature: Tweak Missing type to implicitly allow None values (#48)
Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com>
1 parent fd80590 commit d01733b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

githubkit/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def _validate(cls, value: Any):
3939

4040

4141
UNSET = Unset._UNSET
42-
Missing: TypeAlias = Union[Literal[UNSET], T]
42+
# if the property is not required, we allow it to have the value null.
43+
# See https://github.com/yanyongyu/githubkit/issues/47
44+
Missing: TypeAlias = Union[Literal[UNSET], T, None]
4345

4446

4547
def exclude_unset(data: Any) -> Any:

0 commit comments

Comments
 (0)