Repository navigation
Commit 6f69adb
fix(context_meter): satisfy pyright narrowing in _tools_cache_key
pyright doesn't narrow across two separate t.get("parameters") calls, so it
flagged .keys() as reachable when t.get("parameters") is None even though
the isinstance(..., dict) guard makes that unreachable at runtime. Binds
t.get("parameters") to a local once and isinstance-checks that — a real (if
narrow) robustness improvement too, since it drops a redundant second dict
lookup. No behavior change; confirmed via `pyright orchestrator/context_meter.py`
-> 0 errors, and tests/test_context_meter.py + tests/test_compaction.py still
green.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 7f37580 commit 6f69adb
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
280 | 284 | | |
281 | | - | |
282 | | - | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
| |||
0 commit comments