is_optional
Returns True if the annotation is Optional[SomeType].
Signature:
def is_optional(annotation: Type) -> bool: ...Parameters:
-
annotation:- Type
-
Type
Returns True if the annotation is Optional[SomeType].
def is_optional(annotation: Type) -> bool: ... annotation:
Type