| # noqa: INP001 |
| """Configuration for Sphinx.""" |
| |
| from __future__ import annotations |
| |
| from datetime import datetime, timezone |
| |
| from platformdirs.version import __version__ |
| |
| author = "The platformdirs team" |
| project = "platformdirs" |
| copyright = "2021, The platformdirs team" # noqa: A001 |
| |
| release = __version__ |
| version = release |
| extensions = [ |
| "sphinx.ext.autodoc", |
| "sphinx.ext.autosectionlabel", |
| "sphinx.ext.viewcode", |
| "sphinx.ext.intersphinx", |
| "sphinx_autodoc_typehints", |
| ] |
| html_theme = "furo" |
| html_title, html_last_updated_fmt = "platformdirs", datetime.now(tz=timezone.utc).isoformat() |
| pygments_style, pygments_dark_style = "sphinx", "monokai" |
| autoclass_content, autodoc_member_order, autodoc_typehints = "class", "bysource", "none" |
| autodoc_default_options = { |
| "member-order": "bysource", |
| "undoc-members": True, |
| "show-inheritance": True, |
| } |
| default_role = "any" |
| autosectionlabel_prefix_document = True |
| intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} |