(usage: dict[str, Any], key: str)
| 250 | |
| 251 | |
| 252 | def _int_stat(usage: dict[str, Any], key: str) -> int: |
| 253 | try: |
| 254 | return max(0, int(usage.get(key) or 0)) |
| 255 | except (TypeError, ValueError): |
| 256 | return 0 |
| 257 | |
| 258 | |
| 259 | def _float_stat(usage: dict[str, Any], key: str) -> float: |
no outgoing calls
no test coverage detected