MCPcopy Create free account
hub / github.com/ScrapeGraphAI/toonify / is_primitive

Function is_primitive

toon/utils.py:131–141  ·  view source on GitHub ↗

Check if a value is a primitive type (str, int, float, bool, None, datetime, date). Args: value: Value to check Returns: True if primitive, False otherwise

(value: Any)

Source from the content-addressed store, hash-verified

129
130
131def is_primitive(value: Any) -> bool:
132 """
133 Check if a value is a primitive type (str, int, float, bool, None, datetime, date).
134
135 Args:
136 value: Value to check
137
138 Returns:
139 True if primitive, False otherwise
140 """
141 return isinstance(value, (str, int, float, bool, type(None), datetime, date))
142
143
144def is_array_of_objects(value: Any) -> bool:

Callers 3

_encode_arrayFunction · 0.85
_encode_array_with_keyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…