Skip to content

Add warning message for unresolved python elements #419

Open
@arwedus

Description

@arwedus

Observed behavior

In an rst file with content like:

Autodoc Directives
==================

.. autoapimodule:: example
    :members:
    :noindex:

Non-existing code references
----------------------------

.. autoapifunction:: test_example.bar_test

Where example is an existing python module in autoapi_dirs, and test_example.bar_test is just something I fabulated, sphinx-build -W -b html will happily run through with no warnings.

The resulting HTML page has an empty section "Non-existing code references", i.e. the broken code import is silently ignored.

Expected behavior

sphinx-autoapi emits a warning for every unresolvable code import.

Steps to reproduce

I have added a self-contained example and the list of installed packages.

I tried with sphinx-autoapi 3.0.0 and sphinx-autoapi 2.0.0, and sphinx 7.2.6.

Would be happy to learn if this is a bug or intended behavior. As this is definitely unwanted in our project, I would like to learn how to add a warning for unresolveable imports.

python-autoapi-example.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions