Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,758 changes: 903 additions & 2,855 deletions .basedpyright/baseline.json

Large diffs are not rendered by default.

44 changes: 21 additions & 23 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
from __future__ import annotations

from importlib import metadata
from urllib.request import urlopen


_conf_url = \
"https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
_conf_url = "https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
with urlopen(_conf_url) as _inf:
exec(compile(_inf.read(), _conf_url, "exec"), globals())

copyright = "2009-21, Andreas Kloeckner"
author = "Andreas Kloeckner"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
ver_dic = {}
with open("../pytools/version.py") as vfile:
exec(compile(vfile.read(), "../pytools/version.py", "exec"),
ver_dic)

version = ".".join(str(x) for x in ver_dic["VERSION"])
release = ver_dic["VERSION_TEXT"]
release = metadata.version("pytools")
version = ".".join(release.split(".")[:2])

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -32,21 +21,30 @@
intersphinx_mapping = {
"loopy": ("https://documen.tician.de/loopy", None),
"numpy": ("https://numpy.org/doc/stable", None),
"platformdirs": ("https://platformdirs.readthedocs.io/en/latest", None),
"pymbolic": ("https://documen.tician.de/pymbolic", None),
"pytest": ("https://docs.pytest.org/en/stable", None),
"setuptools": ("https://setuptools.pypa.io/en/latest", None),
"python": ("https://docs.python.org/3", None),
"platformdirs": ("https://platformdirs.readthedocs.io/en/latest", None),
"setuptools": ("https://setuptools.pypa.io/en/latest", None),
}

nitpicky = True
nitpick_ignore_regex = [
["py:class", r"typing_extensions\.(.+)"],
["py:class", r"ReadableBuffer"],
["py:class", r"ObjectArray1D"],
]

autodoc_type_aliases = {
"GraphT": "pytools.graph.GraphT",
"NodeT": "pytools.graph.NodeT",
}

sphinxconfig_missing_reference_aliases = {
# numpy typing
"NDArray": "obj:numpy.typing.NDArray",
"np.dtype": "class:numpy.dtype",
"np.ndarray": "class:numpy.ndarray",
"np.floating": "class:numpy.floating",
# pytools typing
"ObjectArray1D": "obj:pytools.obj_array.ObjectArray1D",
"ReadableBuffer": "data:pytools.ReadableBuffer",
}


def setup(app):
app.connect("missing-reference", process_autodoc_missing_reference) # noqa: F821
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ numpy = [
"numpy>=1.6",
]
test = [
"mypy",
"basedpyright",
"pytest",
"ruff",
]
Expand Down
Loading
Loading