MCPcopy
hub / github.com/celery/celery / annotation_issubclass

Function annotation_issubclass

celery/utils/annotations.py:47–49  ·  view source on GitHub ↗

Test if a given annotation is of the given subclass.

(annotation: typing.Any, cls: type)

Source from the content-addressed store, hash-verified

45
46
47def annotation_issubclass(annotation: typing.Any, cls: type) -> bool:
48 """Test if a given annotation is of the given subclass."""
49 return annotation_is_class(annotation) and issubclass(annotation, cls)

Callers 3

wrapperFunction · 0.85

Calls 1

annotation_is_classFunction · 0.85