MCPcopy
hub / github.com/pallets/flask / tag

Method tag

src/flask/json/tag.py:289–295  ·  view source on GitHub ↗

Convert a value to a tagged representation if necessary.

(self, value: t.Any)

Source from the content-addressed store, hash-verified

287 self.order.insert(index, tag)
288
289 def tag(self, value: t.Any) -> t.Any:
290 """Convert a value to a tagged representation if necessary."""
291 for tag in self.order:
292 if tag.check(value):
293 return tag.tag(value)
294
295 return value
296
297 def untag(self, value: dict[str, t.Any]) -> t.Any:
298 """Convert a tagged representation back to the original type."""

Callers 1

dumpsMethod · 0.95

Calls 2

checkMethod · 0.45
tagMethod · 0.45

Tested by

no test coverage detected