From f708d1742b89492206b819c3bf63035d69ddd06e Mon Sep 17 00:00:00 2001 From: Patrick Kidger <33688385+patrick-kidger@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:55:14 +0100 Subject: [PATCH] Quick fix for docs not generating correctly since the last jaxtyping release --- jaxtyping/__init__.py | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jaxtyping/__init__.py b/jaxtyping/__init__.py index e77fb48..a4694eb 100644 --- a/jaxtyping/__init__.py +++ b/jaxtyping/__init__.py @@ -145,6 +145,7 @@ else: pass Array.__module__ = "builtins" + Array.__qualname__ = "Array" return Array else: import jax @@ -157,6 +158,7 @@ else: pass ArrayLike.__module__ = "builtins" + ArrayLike.__qualname__ = "ArrayLike" return ArrayLike else: import jax.typing @@ -169,6 +171,7 @@ else: pass PRNGKeyArray.__module__ = "builtins" + PRNGKeyArray.__qualname__ = "PRNGKeyArray" return PRNGKeyArray else: # New-style `jax.random.key` have scalar shape and dtype `key`. @@ -216,6 +219,7 @@ else: if typing.GENERATING_DOCUMENTATION: # Equinox etc. docs get just `PyTreeDef`. # jaxtyping docs get `jaxtyping.PyTreeDef`. + PyTreeDef.__qualname__ = "PyTreeDef" PyTreeDef.__module__ = "builtins" return PyTreeDef else: diff --git a/pyproject.toml b/pyproject.toml index 12dfbdb..19d30c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "jaxtyping" -version = "0.2.26" +version = "0.2.27" description = "Type annotations and runtime checking for shape and dtype of JAX arrays, and PyTrees." readme = "README.md" requires-python ="~=3.9"