Add docstrings for HasFileno.fileno and ParkingLot.broken_by - #3526
Closed
faresrafat3 wants to merge 1 commit into
Closed
faresrafat3 wants to merge 1 commit into
faresrafat3 wants to merge 1 commit into
Conversation
Both symbols are part of the public interface and appeared in the documentation via `:undoc-members:` without any description. HasFileno.fileno is now documented like the io.IOBase.fileno it mirrors, and ParkingLot documents broken_by in its Attributes section. This resolves the remaining item tracked in _check_type_completeness.json, so that entry is removed.
Contributor
|
I prefer #3523 |
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.
Fixes #3221.
trio._subprocess.HasFileno.filenoandParkingLot.broken_byare both partof the public interface but had no documentation.
HasFileno.filenowas thelast remaining unchecked item in the "Some functions and properties in the
documentation have no docstring" checklist, and
broken_bywas rendered inthe low-level reference only because
ParkingLotis documented with:undoc-members:, so it showed up as a bare attribute name.Changes
HasFileno.fileno: added a docstring describing what the method returns andnoting that it mirrors
io.IOBase.fileno.ParkingLot: documentedbroken_byin the class'sAttributes:section,matching how other Trio classes describe their attributes.
_check_type_completeness.json: removed the now-resolved entryNo docstring found for function "trio._subprocess.HasFileno.fileno".Verification
The type completeness checker reports the entry as resolved rather than as a
new error:
After removing that entry, the checker passes clean on all three platforms
(Linux, Windows, Darwin).
pyright --verifytypes=triostill reports 99.6% completeness, with themissing-docstring counts unchanged for every other symbol.
The parking-lot tests pass:
The failures in
test_exports.py::test_static_tool_sees_all_symbolsarepre-existing in this environment (they require
pylintandjedi, which arenot installed here) and are unaffected by this change; I confirmed they fail
identically on the unmodified checkout.