MCPcopy Create free account
hub / github.com/github/copilot-sdk / _is_pydantic_model

Function _is_pydantic_model

python/copilot/tools.py:274–279  ·  view source on GitHub ↗

Check if a type is a Pydantic BaseModel subclass.

(t: Any)

Source from the content-addressed store, hash-verified

272
273
274def _is_pydantic_model(t: Any) -> bool:
275 """Check if a type is a Pydantic BaseModel subclass."""
276 try:
277 return isinstance(t, type) and issubclass(t, BaseModel)
278 except TypeError:
279 return False
280
281
282def _normalize_result(result: Any) -> ToolResult:

Callers 3

decoratorFunction · 0.85
wrapped_handlerFunction · 0.85
define_toolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…