Skip to content

Add new Sphinx configuration options #3860

Closed
@Zac-HD

Description

@Zac-HD

From this page on Sphinx configuration options, I think there are some new ones we should try out:

  • nitpicky = True to warn about more missing references. Also set the default_role to py:obj, which will ensure the most common cases work out after all. (main effect: CI will now warn when people use single instead of double-backticks for monospace)
  • needs_sphinx - dynamically load this from requirements/tools.txt so it stays up-to-date with our pins? We install from pins on readthedocs so this should work fine. Convert the == to >= so that checking out an old branch doesn't force a downgrade to build docs.
  • enable maximum_signature_line_length and python_... - going to one argument per line will enable us to show type annotations again (changing autodoc_typehints from none to signature); we'll also want to set autodoc_type_aliases and perhaps load this dynamically from the source code (matching on _: TypeAlias = _ lines - actually this would be a great feature to upstream!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsdocumentation could *always* be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions