Commit 9126a9a
committed
fix(types): close mypy gate on services/ after post-#35 strict enforcement
Two narrow fixes that resolve all 27 mypy errors exposed by master's
stricter typecheck gate (newly enforced when #35 removed
continue-on-error):
* services/workspace_tabs.py:195 — annotate `bubbles: list[dict[str, Any]] = []`
so the iteration variables `b` / `m` get treated as `dict[str, Any]`
rather than `dict[str, object]`. That single annotation kills 26 of
the 27 errors (all the "object has no attribute X" / "Value of type
object is not indexable" cluster around the metadata-aggregation loop).
* services/workspace_resolver.py:84 — `# type: ignore[call-overload]` on
the `row["value"]` access plus a comment pointing at the underlying
cause. sqlite3.Row supports string-key access at runtime when
`row_factory = sqlite3.Row` is set (which `_open_global_db` does),
but mypy's stdlib stub types Row as `tuple[Any, ...]` which only
accepts SupportsIndex.
Verified: mypy → Success, no issues found in 52 source files; ruff →
All checks passed; unittest → 207 / 207 OK.1 parent cb32fca commit 9126a9a
2 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | | - | |
195 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
0 commit comments