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)
| 291 | |
| 292 | @list_args |
| 293 | def 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 |
no test coverage detected