-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
Milestone
Description
When we build the documentation from the .rst files in doc/source/, we use a variable common_imports that is added as context for sphinx, and that is used in the whatsnew files.
But more or less the same imports and options that are used in the whatsnew files, are used in most .rst files.
What would be useful is:
- Rename
common_importstoheader, as this will be used for other things in the future (like definingtocdepth) - Add it at the beginning of all the
.rstfiles in the same way as it's done for thewhatsnewfiles - Remove the equivalent code already at the beginning of the files
- If there is anything that would be useful to add to the content of
common_imports(because it's used in many files), add it
This can have implications on the flake8-rst validation, as I assume the content is validated before rendering, and the imports will be missing during the validation.