MCPcopy Create free account
hub / github.com/dagger/dagger / is_annotated

Function is_annotated

sdk/python/src/dagger/mod/_utils.py:178–183  ·  view source on GitHub ↗

Check if the given type is an annotated type.

(annotation: type)

Source from the content-addressed store, hash-verified

176
177
178def is_annotated(annotation: type) -> bool:
179 """Check if the given type is an annotated type."""
180 return typing.get_origin(annotation) in (
181 typing.Annotated,
182 typing_extensions.Annotated,
183 )
184
185
186def strip_annotations(t: _T) -> _T:

Callers 4

wrapperMethod · 0.90
to_typedefFunction · 0.90
get_metaFunction · 0.85
strip_annotationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected