6060 "scanpydoc" , # needs to be before linkcode
6161 "sphinx.ext.linkcode" ,
6262 "IPython.sphinxext.ipython_console_highlighting" ,
63- "sphinx_toolbox.more_autodoc.autoprotocol" ,
6463 * (p .stem for p in _extension_dir .glob ("*.py" )),
6564]
6665myst_enable_extensions = [
@@ -144,6 +143,7 @@ def res(
144143)
145144
146145qualname_overrides = {
146+ "types.EllipsisType" : ("py:data" , "Ellipsis" ),
147147 "h5py._hl.group.Group" : "h5py.Group" ,
148148 "h5py._hl.files.File" : "h5py.File" ,
149149 "h5py._hl.dataset.Dataset" : "h5py.Dataset" ,
@@ -157,6 +157,7 @@ def res(
157157 "anndata._types.WriteCallback" : "anndata.experimental.WriteCallback" ,
158158 "anndata._types.Read" : "anndata.experimental.Read" ,
159159 "anndata._types.Write" : "anndata.experimental.Write" ,
160+ "anndata._types.StorageType" : "anndata.experimental.StorageType" ,
160161 "anndata._types.Dataset2DIlocIndexer" : "anndata.experimental.Dataset2DIlocIndexer" ,
161162 "zarr.core.array.Array" : "zarr.Array" ,
162163 "zarr.core.group.Group" : "zarr.Group" ,
@@ -168,19 +169,27 @@ def res(
168169 "anndata.compat.CupySparseMatrix" : "cupyx.scipy.sparse.spmatrix" ,
169170 "anndata.compat.XDataArray" : "xarray.DataArray" ,
170171 "anndata.compat.XDataset" : "xarray.Dataset" ,
172+ "anndata.compat.Index" : "anndata.typing.Index" ,
171173 "awkward.highlevel.Array" : "ak.Array" ,
172174 "numpy.int64" : ("py:attr" , "numpy.int64" ),
173175 "numpy.dtypes.StringDType" : ("py:attr" , "numpy.dtypes.StringDType" ),
174176 "pandas.DataFrame.iloc" : ("py:attr" , "pandas.DataFrame.iloc" ),
175177 "pandas.DataFrame.loc" : ("py:attr" , "pandas.DataFrame.loc" ),
178+ "pandas.core.series.Series" : "pandas.Series" ,
179+ "pandas.core.arrays.categorical.Categorical" : "pandas.Categorical" ,
180+ "pandas.core.arrays.base.ExtensionArray" : "pandas.api.extensions.ExtensionArray" ,
176181 "pandas.core.dtypes.dtypes.BaseMaskedDtype" : "pandas.api.extensions.ExtensionDtype" ,
177- # should be fixed soon: https://github.com/tox-dev/sphinx-autodoc-typehints/pull/516
178- "types.EllipsisType" : ("py:data" , "types.EllipsisType" ),
179- "pathlib._local.Path" : "pathlib.Path" ,
180182}
181183autodoc_type_aliases = dict (
182184 NDArray = ":data:`~numpy.typing.NDArray`" ,
183185 AxisStorable = ":data:`~anndata.typing.AxisStorable`" ,
186+ # The following are TypeVars in `anndata._types`, and aren’t actually exported,
187+ # yet this bug causes them to create issues:
188+ # - https://github.com/python/cpython/issues/124089
189+ # - https://github.com/tox-dev/sphinx-autodoc-typehints/issues/580
190+ K = ":class:`zarr.Array` | :class:`h5py.Dataset`" ,
191+ S = ":class:`anndata.experimental.StorageType`" ,
192+ RWAble = ":class:`anndata.typing.RWAble`" ,
184193)
185194
186195# -- Social cards ---------------------------------------------------------
0 commit comments