()
| 107 | |
| 108 | |
| 109 | def _spending_payload() -> dict[str, Any]: |
| 110 | status = SpendControl().status() |
| 111 | return { |
| 112 | "limits": { |
| 113 | key: value |
| 114 | for key, value in vars(status.limits).items() |
| 115 | if value is not None |
| 116 | }, |
| 117 | "spent": status.spent, |
| 118 | "remaining": { |
| 119 | key: value |
| 120 | for key, value in status.remaining.items() |
| 121 | if value is not None |
| 122 | }, |
| 123 | "calls": status.calls, |
| 124 | } |
| 125 | |
| 126 | |
| 127 | def _stats_summary_payload(stats: RouteStats) -> dict[str, Any]: |
no test coverage detected