Commit 9b014c9
committed
fix(exemplar): Fix module import path and clean up dead code
why: When sphinx-argparse-neo is installed as a proper package,
`from argparse_roles import register_roles` fails with ModuleNotFoundError
because `argparse_roles` is no longer a top-level module on sys.path --
it was only resolvable when the file lived under docs/_ext/. The correct
path is `sphinx_argparse_neo.roles`.
Also removes the ASSETS_DIR constant from config.py: it pointed to a
non-existent assets/ directory (spa-nav.js moved to sphinx-gptheme theme
statics) and was never referenced by any code.
Adds DEFAULT_TOC_OBJECT_ENTRIES_SHOW_PARENTS constant to defaults.py and
wires it into merge_sphinx_config() to replace the inline "hide" literal.
what:
- sphinx_argparse_neo/exemplar.py: from argparse_roles → from sphinx_argparse_neo.roles
- gp_sphinx/config.py: remove ASSETS_DIR dead constant
- gp_sphinx/defaults.py: add DEFAULT_TOC_OBJECT_ENTRIES_SHOW_PARENTS = "hide"
- gp_sphinx/config.py: use DEFAULT_TOC_OBJECT_ENTRIES_SHOW_PARENTS constant1 parent 82a1441 commit 9b014c9
File tree
3 files changed
+15
-5
lines changed- packages
- gp-sphinx/src/gp_sphinx
- sphinx-argparse-neo/src/sphinx_argparse_neo
3 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
393 | | - | |
| 391 | + | |
394 | 392 | | |
395 | 393 | | |
396 | 394 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
302 | 314 | | |
303 | 315 | | |
304 | 316 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
1302 | | - | |
| 1302 | + | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
| |||
0 commit comments