Commit 5e4f73b
committed
fix: guard against missing key in annotation dependency tracking
The `_extract_names_from_annotation` method accessed
`self.definitions[self.current_top_level_name]` without verifying
that `current_top_level_name` exists in the definitions dict. When
visiting methods inside built-in types (e.g., `str.removeprefix`),
the dotted name was set as `current_top_level_name` but never added
to `definitions`, causing a KeyError on CI.1 parent deb61fa commit 5e4f73b
2 files changed
Lines changed: 7 additions & 2 deletions
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
0 commit comments