docs: fix all Sphinx documentation warnings#778
Merged
Conversation
Add intersphinx mapping for Python stdlib cross-references and nitpick_ignore for unresolvable ctypes types. Fix malformed Raises sections in setters.py, qualify cross-references to Tag, BlocksList, TS7BlockInfo, and exception classes, and add missing error module to the API docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sphinx.ext.intersphinxwith Python docs mapping to resolve ~110 stdlib type warnings (datetime.datetime,pathlib.Path,socket.socket,logging.Logger,struct, etc.)nitpick_ignorefor ctypes types that intersphinx can't resolve (ctypes.Array,ctypes.c_int,ctypes.c_uint,snap7.type.S7DataItem,snap7.type.c_ubyte_Array_65536)doc/API/error.rstand include it in the index, so cross-references toS7ProtocolError,S7ConnectionError, etc. resolveRaisessections inset_fstringandset_string(continuation lines were parsed as separate exception types)Tag→~snap7.tags.Tag,BlocksList→~snap7.type.BlocksList,TS7BlockInfo→~snap7.type.TS7BlockInfo, exceptions →~snap7.error.*:class:s7.Client/ `:class:`s7.Server/:class:s7.AsyncClient`` with code literals (thes7package isn't in the Sphinx docs):meth:references in s7commplus docstrings with code literalsBefore: 139 warnings. After: 0 warnings. Build passes with
sphinx-build -W -n.Test plan
sphinx-build -W -n -bhtml doc/ doc/_buildsucceeds with 0 warningsuv run pre-commit run --all-filespasses🤖 Generated with Claude Code