Repository navigation
docs(foundation): document RegistryError on the method-name registrars (#2176) - #2183
Merged
Merged
Conversation
#2176) Problem: the registrars in pcapkit/foundation/registry/protocols.py that take a method name raise RegistryError when meth names no matching _read_* method, and none of them documents it. Fix: add a Raises: section, naming each registrar's own _read_* prefix, to register_ipv4_option, register_hip_parameter, register_hopopt_option, register_ipv6_opts_option, register_ipv6_route_routing, register_mh_message, register_mh_option, register_mh_extension, register_tcp_option, register_tcp_mp_option, register_http_frame, register_pcapng_block, register_pcapng_option, register_pcapng_record and register_pcapng_secrets. Docstring-only; the AST with docstrings stripped is unchanged. Test: tests/test_docstring_contract.py passes.
Owner
Author
|
Review: GOOD TO GO at |
5 tasks done
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?
docs— documentation onlyDescription
Closes #2176.
pcapkit/foundation/registry/protocols.pythat take a parser-method name raiseRegistryErrorwhenmethhas no matching_read_*method, but none of them documented it.Raises:section naming its own prefix. That covers the eight the issue lists plus the same gap inregister_tcp_option,register_tcp_mp_option,register_http_frameand the fourregister_pcapng_*registrars. Every one was reproduced raising onmain.main. No new test, because the docstring contract checks documented names, not missingRaises:.test_docstring_contract.py,test_protocols.pyandtest_registry_symmetry_unit.pypass (27).