Access-token expiry as a comparable number. A bundle without an `expires_at` is treated as non-expiring (`+inf`) — consistent with `_is_fresh`, which treats a missing expiry as always fresh. Used to decide which of two stale bundles (in-memory vs. on-disk) was refres
(bundle: dict)
| 1116 | |
| 1117 | @staticmethod |
| 1118 | def _expiry(bundle: dict) -> float: |
| 1119 | """Access-token expiry as a comparable number. |
| 1120 | |
| 1121 | A bundle without an `expires_at` is treated as non-expiring |
| 1122 | (`+inf`) — consistent with `_is_fresh`, which treats a missing |
| 1123 | expiry as always fresh. Used to decide which of two stale |
| 1124 | bundles (in-memory vs. on-disk) was refreshed more recently and |
| 1125 | therefore holds the newest refresh_token. |
| 1126 | """ |
| 1127 | exp = bundle.get("expires_at") |
| 1128 | return float(exp) if isinstance(exp, int) else float("inf") |
| 1129 | |
| 1130 | def _discover_token_endpoint(self, bundle: dict) -> str: |
| 1131 | if self._token_endpoint is not None: |
no test coverage detected