Cross-referenced type annotations for Sphinx autodoc
Project description
sphinx-autodoc-typehints-gp
Single-package replacement for sphinx-autodoc-typehints and
sphinx.ext.napoleon — resolves annotations statically at build time,
no monkey-patching required.
Part of the gp-sphinx shared
autodoc stack: annotation normalization, cross-referenced type links, and
TYPE_CHECKING-safe resolution all live here.
Install
$ pip install sphinx-autodoc-typehints-gp
Usage
extensions = ["sphinx.ext.autodoc", "sphinx_autodoc_typehints_gp"]
# Required: makes autodoc insert type annotations into parameter descriptions.
# Without this, the type cross-referencing pipeline fires but has nothing to attach to.
autodoc_typehints = "description"
Features
- Resolves type hints statically via AST — no
exec(), notyping.get_type_hints(). - Handles
TYPE_CHECKINGblocks correctly (import-time guards are not evaluated). - No text-processing races with
sphinx.ext.napoleon. - Shared annotation normalization and rendering helpers for the
sphinx-autodoc-*family.
Documentation
See the full documentation for the API reference, helper functions, and the static resolution comparison table.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_autodoc_typehints_gp-0.0.1a26.tar.gz.
File metadata
- Download URL: sphinx_autodoc_typehints_gp-0.0.1a26.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c8c048ec466d4a0a99ac2aebac87f5c2c08719aa039d7f25a6e921eef3ff5c
|
|
| MD5 |
a052b83d7cc92a92cc486af215bdfe81
|
|
| BLAKE2b-256 |
fb0741249cdab1d9bd2dd5e9d85400dbae86ec2ce3512655bbd33947238f9fff
|
Provenance
The following attestation bundles were made for sphinx_autodoc_typehints_gp-0.0.1a26.tar.gz:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_typehints_gp-0.0.1a26.tar.gz -
Subject digest:
08c8c048ec466d4a0a99ac2aebac87f5c2c08719aa039d7f25a6e921eef3ff5c - Sigstore transparency entry: 1629670020
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Branch / Tag:
refs/tags/v0.0.1a26 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_autodoc_typehints_gp-0.0.1a26-py3-none-any.whl.
File metadata
- Download URL: sphinx_autodoc_typehints_gp-0.0.1a26-py3-none-any.whl
- Upload date:
- Size: 38.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd407876f561841ce49c9662e889c1ee2d8ae04b6fe27de75580956d33f49d11
|
|
| MD5 |
e60492f97762ec299decc679afd8d1e3
|
|
| BLAKE2b-256 |
08a7b2fc8d3fa6c1cdb8235097ff9e7141415f6c663b97d6c0c79af0cdc0e2f1
|
Provenance
The following attestation bundles were made for sphinx_autodoc_typehints_gp-0.0.1a26-py3-none-any.whl:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_typehints_gp-0.0.1a26-py3-none-any.whl -
Subject digest:
cd407876f561841ce49c9662e889c1ee2d8ae04b6fe27de75580956d33f49d11 - Sigstore transparency entry: 1629670656
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Branch / Tag:
refs/tags/v0.0.1a26 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Trigger Event:
push
-
Statement type: