Repository navigation
chore: cite issues as #NNN in plain comments - #1982
Merged
Merged
Conversation
Plain # comments are never rendered by Sphinx, so the :issue: role there is noise around the number. Convert every plain comment (not docstrings, not #: doc-comments) to #NNN, and add tests/project/test_issue_refs_in_comments.py, which tokenises every tracked .py file and fails on a role in a plain comment, bar three comments that talk about the roles themselves.
Owner
Author
|
GOOD TO GO at
|
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
chore— tooling or repository hygieneDescription of your pull request and other information
Plain
#comments now cite issues as#NNN. The:issue:`NNN`/:pr:`NNN`roles stay only where Sphinx renders them: docstrings,#:attribute comments and.rst.pcapkit/,docs/source/conf.pyandtests/. The citations were found by tokenising every tracked.pyfile, so docstrings are left untouched. The diff changes no code tokens.tests/project/test_issue_refs_in_comments.pyfails on any plain comment that uses the roles. A short allowlist covers comments that talk about the role rather than cite an issue. It fails onmainand passes here.