MCPcopy Index your code
hub / github.com/github/copilot-sdk / deserialize

Function deserialize

scripts/codegen/python.ts:3527–3537  ·  view source on GitHub ↗
(expr: string)

Source from the content-addressed store, hash-verified

3525 const innerTypeName = hasNullableResult ? resolveType(pythonResultTypeName(method, nullableInner)) : resultType;
3526 const isAnyType = innerTypeName === "Any";
3527 const deserialize = (expr: string) => {
3528 if (resultIsOpaque || isAnyType) {
3529 return expr;
3530 }
3531 if (hasNullableResult) {
3532 return resultIsObject
3533 ? `${innerTypeName}.from_dict(${expr}) if ${expr} is not None else None`
3534 : `${innerTypeName}(${expr}) if ${expr} is not None else None`;
3535 }
3536 return resultIsObject ? `${innerTypeName}.from_dict(${expr})` : `${innerTypeName}(${expr})`;
3537 };
3538
3539 // Build request body with proper serialization/deserialization
3540 const emitRequestCall = (paramsExpr: string) => {

Callers 1

emitRequestCallFunction · 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…