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

Function strip_annotations

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

Strip the annotations from a given type.

(t: _T)

Source from the content-addressed store, hash-verified

184
185
186def strip_annotations(t: _T) -> _T:
187 """Strip the annotations from a given type."""
188 return strip_annotations(typing.get_args(t)[0]) if is_annotated(t) else t
189
190
191def is_list_type(t: Any) -> typing.TypeGuard[typing.Sequence]:

Callers 2

dagger_type_structureFunction · 0.90
to_typedefFunction · 0.90

Calls 1

is_annotatedFunction · 0.85

Tested by

no test coverage detected