Commit 88fb6b6
committed
fix: Fetch attribute annotations from inherited members too when parsing docstrings
I'm aware that computing inherited members will cache the MRO, but docstrings are usually never parsed *before* a package has finished loading. We do have to emphasize this in our docs though: extensions must not parse docstrings and modify parsed sections, and should rather modify the docstring value directly (even though it can be less convenient).
We should also stop caching parsed docstrings and MRO anyway: turns out the cache invalidation problem is really problematic.
Issue-mkdocstrings/python#175: mkdocstrings/python#1751 parent 85527c1 commit 88fb6b6
3 files changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
290 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
563 | 564 | | |
564 | 565 | | |
565 | 566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
268 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
0 commit comments