Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
sayanarijit committed Jan 5, 2024
1 parent 00b9c4d commit b525428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apphelpers/utilities/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@


def is_optional(t) -> bool:
return len(getattr(t, "__args__", [])) == 2 and t.__args__[1] == NoneType
return NoneType in getattr(t, "__args__", ())

0 comments on commit b525428

Please sign in to comment.