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

Function get_deprecated

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

Get the deprecation metadata from an annotated type.

(obj: Any)

Source from the content-addressed store, hash-verified

132
133
134def get_deprecated(obj: Any) -> str | None:
135 """Get the deprecation metadata from an annotated type."""
136 if meta := get_meta(obj, Deprecated):
137 return meta.reason
138 return None
139
140
141def is_union(th: TypeHint) -> bool:

Callers 1

_make_parameterMethod · 0.90

Calls 1

get_metaFunction · 0.85

Tested by

no test coverage detected