MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / is_primitive

Function is_primitive

utils/src/utils.py:258–263  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

256
257
258def is_primitive(obj):
259 if isinstance(obj, (list, tuple, set, frozenset)):
260 return all(is_primitive(item) for item in obj)
261 return isinstance(
262 obj, (int, float, complex, bool, str, bytes, bytearray, type(None))
263 )
264
265
266DEFAULT_EXCLUDE = set(["element", "language_id", "ln", "placeholder_format"])

Callers 1

object_to_dictFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected