Commit bb61bd8
committed
fix(types): resolve 2 mypy errors surfaced by the refreshed mypy
The lockfile refresh floats mypy (^1.10.1) up to 1.20.2, which is stricter
and flags two pre-existing latent type issues that the older mypy missed:
- auth/oauth.py:48 — is_expired() returned `exp_time and (...)`, whose value
is `Any | None` (the exp claim) when falsy, not bool, violating the
`-> bool` annotation. Use `exp_time is not None and (...)` so the return
is a real bool and the None-exp case is explicit.
- auth/retry.py:248 — the command_type setter was annotated
`value: CommandType`, but the getter returns `Optional[CommandType]` and
__private_init__ assigns an `Optional[CommandType]`. Widen the setter to
`Optional[CommandType]` to match the getter and actual usage.
Both are type-annotation-only changes; no runtime behavior change.
Co-authored-by: Isaac
Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>1 parent 30aa6e3 commit bb61bd8
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
0 commit comments