MCPcopy
hub / github.com/Data-Centric-AI-Community/fg-data-profiling / fmt

Function fmt

src/data_profiling/report/formatters.py:293–305  ·  view source on GitHub ↗

Format any value. Args: value: The value to format. Returns: The numeric formatting if the value is float or int, the string formatting otherwise.

(value: Any)

Source from the content-addressed store, hash-verified

291
292@list_args
293def fmt(value: Any) -> str:
294 """Format any value.
295
296 Args:
297 value: The value to format.
298
299 Returns:
300 The numeric formatting if the value is float or int, the string formatting otherwise.
301 """
302 if type(value) in [float, int]:
303 return fmt_numeric(value)
304 else:
305 return str(escape(value))
306
307
308@list_args

Callers 14

get_dataset_schemaFunction · 0.90
get_dataset_reproductionFunction · 0.90
render_genericFunction · 0.90
render_countFunction · 0.90
render_textFunction · 0.90
render_realFunction · 0.90
render_timeseriesFunction · 0.90
render_pathFunction · 0.90
render_complexFunction · 0.90
render_booleanFunction · 0.90
render_categoricalFunction · 0.90

Calls 1

fmt_numericFunction · 0.85

Tested by

no test coverage detected