(self, window: Literal["hourly", "daily", "session"])
| 224 | return self._session_spent |
| 225 | |
| 226 | def get_remaining(self, window: Literal["hourly", "daily", "session"]) -> float | None: |
| 227 | limit = getattr(self._limits, window, None) |
| 228 | if limit is None: |
| 229 | return None |
| 230 | return max(0.0, limit - self.get_spending(window)) |
| 231 | |
| 232 | def status(self) -> SpendingStatus: |
| 233 | now = self._now() |