Commit a749368
authored
stubgen: Fix mis-parsing of double colon ("::") (#20285)
When parsing the docstrings of a function to find its set of overloads,
C++ code samples that mention the function name were at risk of matching
the C++ scoping operator "::" as a type annotation, leading to malformed
output. For example "MyFunc(foo: int) -> bool" is a valid signature, but
the sample code "MyFunc(Eigen::Lower)" was being mis-parsed. Fix this by
patching stubgen to reset in case it sees a double colon where a single
colon "name: type" stanza was expected.1 parent 149f753 commit a749368
2 files changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
236 | 249 | | |
237 | 250 | | |
238 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
374 | 376 | | |
375 | 377 | | |
376 | 378 | | |
| |||
0 commit comments