MCPcopy Create free account
hub / github.com/0xMarcio/cve / maybe_float

Function maybe_float

scripts/utils.py:84–90  ·  view source on GitHub ↗
(value: str | float | int | None)

Source from the content-addressed store, hash-verified

82
83
84def maybe_float(value: str | float | int | None) -> Optional[float]:
85 if value is None:
86 return None
87 try:
88 return float(value)
89 except (TypeError, ValueError):
90 return None
91
92
93# --- PoC data helpers ----------------------------------------------------

Callers 1

normalise_rowsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected