MCPcopy Create free account
hub / github.com/celery/celery / add_pydantic_string_annotations

Function add_pydantic_string_annotations

t/integration/tasks.py:609–612  ·  view source on GitHub ↗

Add two numbers, but with string-annotated Pydantic models (__future__.annotations bug).

(data: "AddParameterModel")

Source from the content-addressed store, hash-verified

607
608@shared_task(pydantic=True)
609def add_pydantic_string_annotations(data: "AddParameterModel") -> "AddResultModel":
610 """Add two numbers, but with string-annotated Pydantic models (__future__.annotations bug)."""
611 value = data.x + data.y
612 return AddResultModel(result=value)
613
614
615if LEGACY_TASKS_DISABLED:

Callers

nothing calls this directly

Calls 1

AddResultModelClass · 0.85

Tested by

no test coverage detected