Commit 8239a7b
authored
👌 Honor -D overrides when loading needs_from_toml (#1717)
Keep Sphinx CLI config overrides (`-D` / `confoverrides`) authoritative
in `load_config_from_toml` by skipping TOML assignments for keys that
were already overridden.
- Read override keys from `config.overrides`
- Skip setting `needs_<key>` when `<key>` or `needs_<key>` is overridden
- Skip setting schema entries when `needs_schema_` or
`needs_schema_<key>` is overridden
- Add regression test verifying TOML does not overwrite
`needs_reproducible_json` when provided via `confoverrides`
This preserves expected precedence: CLI overrides > TOML values >
defaults.1 parent a158906 commit 8239a7b
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
485 | 489 | | |
486 | 490 | | |
487 | 491 | | |
488 | 492 | | |
489 | | - | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
490 | 498 | | |
491 | 499 | | |
492 | 500 | | |
| 501 | + | |
493 | 502 | | |
494 | 503 | | |
495 | 504 | | |
| 505 | + | |
| 506 | + | |
496 | 507 | | |
497 | 508 | | |
498 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments