Commit a0977e2
committed
docs(fix[gallery]): resolve 9 directive errors and 3 duplicate-module warnings
why: Someone sprinkled `:noindex:` across `docs/gallery.md` hoping
to silence `duplicate object description of gp_demo_api |
spf_demo_fixtures | api_demo_layout` warnings, but the duplicates
actually originate in three `{py:module}` MyST blocks — while the
`:noindex:` option was being applied to seven custom `SphinxDirective`
subclasses that either do not register any domain object (six of
them) or only accept the modern dashed form `:no-index:` (one of
them, `autoconfigvalues`, which already declares it in `option_spec`).
The result: 9 "maximum 1 argument supplied" / "unknown option" /
"no content permitted" errors per build, plus the original 3 dup
warnings untouched. Sphinx 5+ canonicalized the dashed spelling;
only `ObjectDescription` subclasses honour the legacy alias
(`sphinx/directives/__init__.py:226–237`).
what:
- Add `:no-index:` to the three `{py:module}` MyST blocks
(gp_demo_api, api_demo_layout, spf_demo_fixtures) — these are
the real source of the duplicate warnings; the per-package
detail pages remain the canonical registration
- Drop meaningless `:noindex:` from six pure-render directives
(`fastmcp-tool` ×3, `fastmcp-tool-input`, `fastmcp-tool-summary`,
`autoconfigvalue-index`, `autodirective-index`, `autorole-index`)
— each emits only sections/tables with no domain registration, so
the flag was a no-op that currently errors out
- Fix the one spelling mistake: `autoconfigvalues :noindex:`
→ `:no-index:` (the directive already declares
`option_spec = {"no-index": directives.flag}` and registers
`py:data` objects, so the dashed form is what it expects)
- No source changes to any custom directive: six of the seven
register no domain objects, so adding an empty `option_spec`
solely to swallow `:no-index:` would silently mask user mistakes
instead of surfacing them
- Build now `build succeeded.` with zero warnings (was
`build succeeded, 12 warnings`)1 parent 0235780 commit a0977e2
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | | - | |
112 | 113 | | |
113 | 114 | | |
114 | | - | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
131 | | - | |
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
135 | 132 | | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
| 136 | + | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
| |||
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
159 | | - | |
160 | 157 | | |
161 | 158 | | |
162 | 159 | | |
163 | 160 | | |
164 | | - | |
| 161 | + | |
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
| |||
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
175 | | - | |
176 | 172 | | |
177 | 173 | | |
178 | 174 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | 183 | | |
189 | 184 | | |
190 | 185 | | |
| |||
0 commit comments