Skip to content

viewcode: highlighted code continues to be generated even if not referenced #8756

Closed

Description

@tk0miya

Describe the bug
viewcode: highlighted code continues to be generated even if not referenced

To Reproduce

  1. Add autodoc entry to the reST file (ex. reference.rst)
  2. Build HTML (make html)
  3. Remove the 1) file and HTML files (rm -rf _build/html)
  4. Build HTML again w/ incremental build (make html)

Expected behavior
Highlighted code will not be generated.

Your project
No

Screenshots
No

Environment info

  • OS: Mac
  • Python version: 3.9.1
  • Sphinx version: HEAD of 3.x
  • Sphinx extensions: sphinx.ext.autodoc, sphinx.ext.viewcode
  • Extra tools: No

Additional context
No

Activity

  1. added this to the 3.5.0 milestone on Jan 24, 2021
  2. added a commit that references this issue on Jan 24, 2021
    8dc8c01
  3. added a commit that references this issue on Jan 25, 2021
    d6498f8
  4. locked as resolved and limited conversation to collaborators on Jul 14, 2021
  5. added
    extensions:viewcode
    and removed on Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensions:viewcodetype:bug

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions