Skip to main content

Sphinx: Render inherited overloads with autodoc

This extension works around a small issue in Sphinx where autodoc does not show inherited @overload signatures, by manually resolving overloads during the autodoc-process-signature event. Dynamically, the overloads for a function can only be obtained using the typing.get_overloads() function, which was introduced in Python 3.11. The latter is therefore a hard requirement.

Installation

For testing, you can install the sphinxcontrib.autodoc_inherit_overload package from pip:

pip install sphinxcontrib.autodoc_inherit_overload

When adding the package to your dependencies, make sure you guard against incorrect Python versions:

sphinxcontrib.autodoc_inherit_overload; python_version>='3.11'

The same applies to loading the extension in your conf.py:

extensions = [
    # your extensions
    ...
]
if sys.version_info >= (3, 11):
    extensions += ['sphinxcontrib.autodoc_inherit_overload']

Metadata

Release files for sphinxcontrib.autodoc-inherit-overload 2023.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinxcontrib.autodoc-inherit-overload 2023.4
File Size Uploaded Provenance Actions
sphinxcontrib.autodoc_inherit_overload-2023.4.tar.gz 2.6 kB Without provenance Details for sphinxcontrib.autodoc_inherit_overload-2023.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sphinxcontrib.autodoc-inherit-overload 2023.4
File Interpreter ABI Platform Actions
sphinxcontrib.autodoc_inherit_overload-2023.4-py3-none-any.whl Python 3 none any Details for sphinxcontrib.autodoc_inherit_overload-2023.4-py3-none-any.whl

Total release size: 5.9 kB

Release files / sphinxcontrib.autodoc_inherit_overload-2023.4.tar.gz

Download URL sphinxcontrib.autodoc_inherit_overload-2023.4.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fb6a0d7d4380b14f07b6bd7ffdac61b4e0522499d70522f3bfbc670917615d22
BLAKE2b-256 checksum
How to use checksums
885c7463f42c7249bea1590105f5965b26d5d6a1c06c6bd580b1c0ac41203705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / sphinxcontrib.autodoc_inherit_overload-2023.4-py3-none-any.whl

Download URL sphinxcontrib.autodoc_inherit_overload-2023.4-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ac164aec1c4df941a279282e5ecebe286d91e0b35637a0faa23e25245efd0df
BLAKE2b-256 checksum
How to use checksums
dc8a639b4889c4d97c81697c9eead56adc51b1d91a4c81238f87c191c0fa7f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for sphinxcontrib.autodoc-inherit-overload 2023.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2023.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page