Skip to main content

sphinx-resolve-py-references

A sphinx extension that fixes or warns about missing references to Python objects

The extension is useful because it's often annoying to write out the full path to an object in your docs which you know is imported in the current module. This is also true for neighboring modules which would be easier referenced with a relative name.

This extension resolves these issues by allowing you to reference functions or classes which are imported in the current module as if they had been defined there and creates a backlink to their true location.

from some_package import MyClass

def my_function():
    '''Uses :class:`MyClass`'''
    # The above reference would normally fail because `MyClass`
    # is not defined in this module. However this extension
    # automatically resolves the reference

This is done by analyzing the AST to find import statements and trace them back to the place where the target was defined. This is more robust than looking at the __module__ and __name__ attributes of classes and functions because not all documentable objects have these properties (e.g. global variables).

Metadata

Release files for sphinx-resolve-py-references 0.1.0

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

Source distribution (sdist)

Source distribution for sphinx-resolve-py-references 0.1.0
File Size Uploaded
sphinx_resolve_py_references-0.1.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-resolve-py-references 0.1.0
File Interpreter ABI Platform
sphinx_resolve_py_references-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 12.1 kB

Release files / sphinx_resolve_py_references-0.1.0.tar.gz

Download URL sphinx_resolve_py_references-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0f87c06b29ec128964aee2e40d170d1d3c0e5f4955b2618a89ca724f42385372
BLAKE2b-256 checksum
How to use checksums
d4cfce91f269bb8964304c9d667f65730bf0746f5846725bb6f895db2ea4d832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

Release files / sphinx_resolve_py_references-0.1.0-py2.py3-none-any.whl

Download URL sphinx_resolve_py_references-0.1.0-py2.py3-none-any.whl
Size 6.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ccf44a6b62d75c3a568285f4e1815734088c1a7cab7bbb7935bb22fbf0d78bc2
BLAKE2b-256 checksum
How to use checksums
032688a46aa237eddb95467bff2139ddc04487df53c2740a8b75fb9c70c2977e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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