From eba31d4d3d8886e2c8ca79ef84d2e2e92f23d107 Mon Sep 17 00:00:00 2001
From: DawoudSheraz <dawoud.sheraz@gmail.com>
Date: Wed, 28 Feb 2024 22:05:29 +0500
Subject: [PATCH] docs: Py312 docs build

---
 docs/conf.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index 48d0516fe2..abf9678973 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -51,6 +51,9 @@
     # python 3.10
     ("py:class", "NoneType"),
     ("py:class", "click.core.Command"),
+    # Python 3.12
+    ("py:class", "FilterCallbackFunc"),
+    ("py:class", "L"),
 ]
 # Resolve type aliases here
 # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_type_aliases
@@ -58,6 +61,15 @@
     # 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",
 }