Commit 5923214
committed
review: address 3 Brad findings on PR #35
* `.github/workflows/tests.yml` — block comment above the typecheck job
still described `continue-on-error: true` as the transitional policy,
contradicting the actual code which removed it in this same PR. Updated
the comment to reflect the enforced gate.
* `api/logs.py` — out of issue #29's literal scope (issue lists only the
three files I converted in the previous commit), but inconsistent with
the "clean demo" spirit. Two `print()` error logs at lines 73 and 140
swapped for `_logger.exception(...)` matching the pattern in
api/workspaces.py / api/search.py / api/composers.py.
* `api/search.py:56` — `combined: list = []` is the minimum annotation
that satisfies mypy, but `list[str]` is the actual shape: both
content_parts and metadata_parts are typed `list[str]` upstream, the
filter `(p for p in ... if p)` only adds truthy strings, and the
consumer is `"\n\n".join(combined)` which requires strings. Tightened.
Verified locally:
- mypy --ignore-missing-imports --no-strict-optional . → Success
- ruff check api/ utils/ scripts/export.py app.py → All checks passed
- unittest discover tests → 178 / 178 OK1 parent 7bbfe43 commit 5923214
3 files changed
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
73 | | - | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
139 | | - | |
140 | | - | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
0 commit comments