Check if the annotation is SomeType | None. Does not support Annotated types. Use only on types that have been resolved with get_type_hints.
(th: TypeHint)
| 144 | |
| 145 | |
| 146 | def is_nullable(th: TypeHint) -> bool: |
| 147 | """Check if the annotation is SomeType | None. |
| 148 | |
| 149 | Does not support Annotated types. Use only on types that have been |
| 150 | resolved with get_type_hints. |
| 151 | """ |
| 152 | return th.is_bearable(None) |
| 153 | |
| 154 | |
| 155 | def non_null(th: TypeHint) -> TypeHint: |
no outgoing calls