(value: Any, default: int)
| 139 | return default |
| 140 | |
| 141 | |
| 142 | def _to_positive_int(value: Any, default: int) -> int: |
| 143 | try: |
| 144 | parsed = int(float(value)) |
| 145 | except (TypeError, ValueError): |
| 146 | parsed = default |
| 147 | return max(1, parsed) |
| 148 | |
| 149 |
no outgoing calls
no test coverage detected