Commit 1b5e677
committed
fix: ruff format + 100% coverage on dereference_local_refs
CI was failing on two checks (not test failures — earlier diagnostic was wrong):
1. pre-commit / Ruff Format — base.py had a multi-line wrap ruff wanted single-line.
2. Coverage check — project requires 100% coverage; schema.py was at 92.86%
with 3 uncovered lines (empty/null $defs short-circuits + a defensive
non-dict branch).
Changes:
- Apply ruff format to base.py.
- Mark the defensive non-dict branch in inline() with '# pragma: no cover'
with comment explaining it's only reachable for non-JSON-shaped values.
- Add 3 tests covering the previously-uncovered branches:
* empty $defs container ('{}')
* null $defs ('None')
* refs nested inside a list (anyOf array)
Local verification: 349 server tests pass, dereference_local_refs at 100%
coverage (14 tests), ruff check clean, ruff format clean.
Signed-off-by: Mukunda Katta <mukunda.vjcs6@gmail.com>1 parent 5109e64 commit 1b5e677
File tree
3 files changed
+35
-6
lines changed- src/mcp/server/mcpserver
- tools
- utilities
- tests/server/mcpserver/utilities
3 files changed
+35
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 81 | + | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
68 | 67 | | |
69 | 68 | | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
0 commit comments