Repository navigation
fix(docs): drop dpkt.py's duplicate DPKT target and let the epilog test see #: comments (#2177) - #2181
Merged
Conversation
…st see #: comments (#2177) Problem: the TIMESTAMP_ATTR and BUFFER_ATTR #: comments in pcapkit/toolkit/dpkt.py define `.. _DPKT:` again, though rst_epilog already defines it. test_no_file_defines_an_epilog_name_again read raw file text, so its TARGET and SUBST patterns could not match behind a #: prefix. Fix: delete both targets; the epilog's DPKT target serves the references. The test now scans _rendered() text (docstrings and #: comments, the prefix blanked), through a new _redefinitions() helper. Test: test_no_file_defines_an_epilog_name_again fails on origin/main's dpkt.py (lines 58 and 71) and passes with the fix; test_a_doc_comment_redefinition_is_seen pins the #: case.
Owner
Author
|
Review: GOOD TO GO at |
Owner
Author
|
Ready to merge at
|
Contributor
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
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 testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription
Closes #2177.
TIMESTAMP_ATTRandBUFFER_ATTR#:comments inpcapkit/toolkit/dpkt.pydefine.. _DPKT:again, thoughrst_epilogalready defines it.DPKTtarget serves the references.test_no_file_defines_an_epilog_name_againread raw file text, whereTARGETandSUBSTcannot match behind a#:prefix. It now scans_rendered()text (docstrings and#:comments, with the prefix blanked) through a new_redefinitions()helper.test_a_doc_comment_redefinition_is_seenpins the#:case.main, the updated test fails withLists differ: ['pcapkit/toolkit/dpkt.py:58: _DPKT', 'pcapkit/toolkit/dpkt.py:71: _DPKT'] != [](1 failed, 9 passed). With the fix, 10 pass.dpkt.py; the two merge cleanly.