Commit bb3f0dc
[BUG] Fix redirect-from Sphinx extension (matplotlib#27915)
* [BUG] Fix clear_doc for redirect-from domain
* [BUG] Implement merge_domaindata
Update merge_domaindata to match Sphinx example implementation
https://github.com/sphinx-doc/sphinx/blob/5523c9bbe4d1415777669330411d4f00ad802f18/sphinx/ext/todo.py#L90-L92
* [BUG] Remove check for redirects that already exist
Check causes build to fail when Sphinx uses a cached build environment. We can just rewrite the cached redirect.
* [LINT] Fix linting issue
* [ENH] Switch Directive to SphinxDirective, which has self.env
* [BUG] Re-introduce sanity check
* Added domain.redirects sanity check back in
* Clear cached redirects from the domain
* [BUG] Reintroduce merge_domaindata sanity check
* Refactor
* Revert changes to merge_domaindata
* Cleanup code
Implement suggested changes
Co-authored-by: Elliott Sales de Andrade <[email protected]>
---------
Co-authored-by: Elliott Sales de Andrade <[email protected]>1 parent 9dd9cb4 commit bb3f0dc
1 file changed
+15
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
98 | 97 | | |
99 | 98 | | |
100 | 99 | | |
| |||
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
0 commit comments