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

Method convert

celery/bin/base.py:332–344  ·  view source on GitHub ↗
(self, value, param, ctx)

Source from the content-addressed store, hash-verified

330 name = "json object"
331
332 def convert(self, value, param, ctx):
333 if isinstance(value, dict):
334 return value
335
336 try:
337 v = json.loads(value)
338 except ValueError as e:
339 self.fail(str(e))
340
341 if not isinstance(v, dict):
342 self.fail(f"{value} was not an object")
343
344 return v
345
346
347class ISO8601DateTime(ParamType):

Callers

nothing calls this directly

Calls 1

failMethod · 0.45

Tested by

no test coverage detected