(type_: _AnnotationScanType)
| 339 | |
| 340 | |
| 341 | def is_pep695(type_: _AnnotationScanType) -> TypeGuard[TypeAliasType]: |
| 342 | # NOTE: a generic TAT does not instance check as TypeAliasType outside of |
| 343 | # python 3.10. For sqlalchemy use cases it's fine to consider it a TAT |
| 344 | # though. |
| 345 | # NOTE: things seems to work also without this additional check |
| 346 | if is_generic(type_): |
| 347 | if is_pep593(type_): |
| 348 | return False |
| 349 | return is_pep695(type_.__origin__) |
| 350 | return isinstance(type_, _type_instances.TypeAliasType) |
| 351 | |
| 352 | |
| 353 | def pep695_values(type_: _AnnotationScanType) -> Set[Any]: |
no test coverage detected