Skip to content

autoapimodule directive in "manual mode": Imported members are documented #342

Open
@tony

Description

@tony

image

Above: Imports visible in documentation with .. autoapimodule directive

Related: #262, #317

Reproduction

https://github.com/vcs-python/libvcs/tree/autoapi-duplicates

Versions

sphinx 5.1.0
sphinx-autoapi 1.9.0

Configuration

conf.py

extensions = [
    "sphinx.ext.napoleon",
    "autoapi.extension",
    "sphinx.ext.autodoc",
    "sphinx.ext.todo",
    "sphinx.ext.intersphinx",
    "myst_parser",
]

# sphinx-autoapi
autoapi_type = "python"
autoapi_dirs = [project_root / "libvcs"]
autoapi_generate_api_docs = False  # when False, use directives

Directions

image

Workaround

Workaround ATM exclude-members for each usage:

.. autoapimodule:: libvcs.projects.git
   :members:
   :show-inheritance:
   :undoc-members:
   :exclude-members: BaseProject, StrOrBytesPath, StrPath

Discussion

  • Any better workarounds?
  • Is this a bug or expected behavior?
  • Could my package structure be playing a role?
  • Anyone else experiencing this? Ideas / workarounds?

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