Skip to content

Commit

Permalink
docs: Py312 docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
DawoudSheraz committed Feb 29, 2024
1 parent 791b2ed commit bb54353
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/20240229_151232_dawoud.sheraz_py312.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Feature] Add Python 3.12 CI and `make docs` compatibility (by @DawoudSheraz)
11 changes: 11 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,24 @@
# python 3.10
("py:class", "NoneType"),
("py:class", "click.core.Command"),
# Python 3.12
("py:class", "FilterCallbackFunc"),
]
# Resolve type aliases here
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases
autodoc_type_aliases: dict[str, str] = {
# python 3.10
"T": "tutor.core.hooks.actions.T",
"T2": "tutor.core.hooks.filters.T2",
# # python 3.12
"L": "tutor.core.hooks.filters.L",
"FilterCallbackFunc": "tutor.core.hooks.filters.FilterCallbackFunc",
# https://stackoverflow.com/questions/73223417/type-aliases-in-type-hints-are-not-preserved
# https://github.com/sphinx-doc/sphinx/issues/10455
# https://github.com/sphinx-doc/sphinx/issues/10785
# https://github.com/emdgroup/baybe/pull/67
"Action": "tutor.core.hooks.actions.Action",
"Filter": "tutor.core.hooks.filters.Filter",
}


Expand Down

0 comments on commit bb54353

Please sign in to comment.