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

Function pushPyFieldMarkers

scripts/codegen/python.ts:694–705  ·  view source on GitHub ↗

* Emit `# Deprecated:` / `# Experimental:` / `# Internal:` comments above a * dataclass field. Order matches our other codegens (deprecated, experimental, * internal) and keeps the comments out of the field declaration itself.

(lines: string[], propSchema: JSONSchema7 | null | undefined)

Source from the content-addressed store, hash-verified

692 * internal) and keeps the comments out of the field declaration itself.
693 */
694function pushPyFieldMarkers(lines: string[], propSchema: JSONSchema7 | null | undefined): void {
695 if (!propSchema) return;
696 if (isSchemaDeprecated(propSchema)) {
697 lines.push(` # Deprecated: this field is deprecated.`);
698 }
699 if (isSchemaExperimental(propSchema)) {
700 lines.push(` # Experimental: this field is part of an experimental API and may change or be removed.`);
701 }
702 if (isSchemaInternal(propSchema)) {
703 lines.push(` # Internal: this field is an internal SDK API and is not part of the public surface.`);
704 }
705}
706
707/**
708 * Modernize quicktype's Python 3.7 output to Python 3.11+ syntax:

Callers 2

emitPyClassFunction · 0.85

Calls 4

isSchemaDeprecatedFunction · 0.85
isSchemaExperimentalFunction · 0.85
isSchemaInternalFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…