/** * Read a YAML scalar the way Python's `float()` would — the ONE implementation of that question in * the deploy module. * * Two places need it, for the same reason: the numbers they read are also read on the skills side * by Python, and a disagreement means the discovery card and the verb compute different money. * `min-budget.ts` uses it as the port of `min_budget.py`'s `_f`; `package.ts` uses it for * `funding_share`, which additionally drives `planFunding`'s real allocation. They were briefly two * near-copies that had already drifted (one had a boolean branch, the other did not) — which is the * drift class this whole workstream exists to close, so they are one function now. * * SHAPE, NOT LETTER. A number, a bool, or a numeric string parses; everything else is null. Two * classes of input where that is not exactly `float()`, both verified, both deliberately left: * * - **A blank/whitespace string.** `float("")` raises, `Number("")` is `0`, so the explicit guard * aligns them. Defence in depth: it changes no output today, because every call site rejects `0` * downstream anyway — but that alignment then survives the next edit to any of those guards * instead of holding by accident. * - **Quoted exotic numeric strings**, the only real parity gap across ~450 adversarial inputs, and * reachable ONLY through a quoted YAML scalar (an unquoted `0x14` parses to `20` on both sides * before either implementation sees it). Python accepts more than `Number` in some places * (`"2_5"` → 25.0 under PEP 515, `"Infinity"`/`"inf"` → inf) and less in others (`"0x14"` raises * where `Number` gives 20). Deliberately NOT "fixed" with a numeric-literal regex: that closes * the `0x14` direction while leaving the underscore direction open, trading a documented, tested * divergence for a half-corrected one. Both directions are pinned as tests — in * `min-budget.test.ts` for the sizing path and `package.test.ts` for `funding_share` — so a * future "fix" cannot flip one silently. * * No shipped package is affected either way: across the 103 catalog packages, zero declare a quoted * or non-numeric `funding_share` and zero declare a quoted sizing value. */ /** Python `float(x)`, returning null where it would raise. See the module header for the two gaps. */ export declare function pythonFloat(value: unknown): number | null; //# sourceMappingURL=python-float.d.ts.map