summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2022-08-01 02:22:15 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2022-08-01 02:22:15 +0300
commit6b29bcec5c8cd5d68b6d52a34bb3875b3aaf582b (patch)
treec532dcadf1ecc4815fb46aa2475f818c0e500c12
parente77f3d742923436a0decd33b4c842b4e8c44e38d (diff)
downloadapscheduler-6b29bcec5c8cd5d68b6d52a34bb3875b3aaf582b.tar.gz
Added sphinx_autodoc_typehints and adjusted Sphinx autodoc options
-rw-r--r--docs/conf.py9
-rw-r--r--pyproject.toml3
2 files changed, 10 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 561a5b8..5fcb774 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,7 +28,12 @@ author = "Alex Grönholm"
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
-extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx_tabs.tabs"]
+extensions = [
+ "sphinx.ext.autodoc",
+ "sphinx.ext.intersphinx",
+ "sphinx_tabs.tabs",
+ "sphinx_autodoc_typehints",
+]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
@@ -38,6 +43,8 @@ templates_path = ["_templates"]
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
+autodoc_default_options = {"members": True, "show-inheritance": True}
+autodoc_mock_imports = ["asyncpg", "cbor2", "paho", "pymongo", "redis", "sqlalchemy"]
# -- Options for HTML output -------------------------------------------------
diff --git a/pyproject.toml b/pyproject.toml
index 6d1c233..327fe5a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -64,7 +64,8 @@ test = [
doc = [
"sphinx",
"sphinx-rtd-theme",
- "sphinx-tabs >= 3.3.1"
+ "sphinx-autodoc-typehints",
+ "sphinx-tabs >= 3.3.1",
]
[tool.setuptools_scm]