Skip to content

10269: Annotate readBody as per the docstring#1668

Merged
twm merged 6 commits intotwisted:trunkfrom
DMRobertson:annotate-readBody
Jan 17, 2022
Merged

10269: Annotate readBody as per the docstring#1668
twm merged 6 commits intotwisted:trunkfrom
DMRobertson:annotate-readBody

Conversation

@DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Oct 21, 2021

Scope and purpose

Quick drive-by contribution. The docstring already describes the input and output types for this function. I'd like to make those part of the annotations.

Contributor Checklist:

  • The associated ticket in Trac is here: https://twistedmatrix.com/trac/ticket/10269
  • I ran tox -e lint to format my patch to meet the Twisted Coding Standard
  • I have created a newsfragment in src/twisted/newsfragments/ (see: News files)
  • The title of the PR starts with the associated Trac ticket number (without the # character).
  • I have updated the automated tests and checked that all checks for the PR are green.
    • ❓ pypy-3.7-alldeps-nocov-posix is failing. Not sure why? pypy-3.7-alldeps-withcov-posix is succeeding so I wonder if this might be some CI flakiness? (Given that my changes are just type hints, and that there aren't any extra imports, I wouldn't expect there to be any behaviour changes at runtime.)
  • I have submitted the associated Trac ticket for review by adding the word review to the keywords field in Trac, and putting a link to this PR in the comment; it shows up in https://twisted.reviews/ now.
  • The merge commit will use the below format
    The first line is automatically generated by GitHub based on PR ID and branch name.
    The other lines generated by GitHub should be replaced.
Merge pull request #1668 from DMRobertson:annotate-readBody

Author: DMRobertson
Reviewer: <github_username>, <github_username_if_more_reviewers>
Fixes: ticket:10269

The docstring already describes the input and output types for this function.
Include this information in the type annotations, so type checkers can see this
information and enforce the requirements.

@DMRobertson DMRobertson changed the title Annotate readBody as per the docstring 10269: Annotate readBody as per the docstring Oct 21, 2021
@DMRobertson
Copy link
Contributor Author

DMRobertson commented Oct 21, 2021

pypy-3.7-alldeps-nocov-posix is failing. Not sure why? pypy-3.7-alldeps-withcov-posix is succeeding so I wonder if this might be some CI flakiness?

(Given that my changes are just type hints, and that there aren't any extra imports, I wouldn't expect there to be any behaviour changes at runtime.)

@DMRobertson DMRobertson marked this pull request as ready for review October 21, 2021 11:17
Copy link
Member

@twm twm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you! The build failure is surely flakiness; I'll poke at it a bit.

@glyph
Copy link
Member

glyph commented Jan 15, 2022

@twm @DMRobertson Hopefully the build flakiness was https://twistedmatrix.com/trac/ticket/10291 and it's fixed now?

@twm
Copy link
Member

twm commented Jan 17, 2022

Thank you for fixing that @glyph!

@twm twm merged commit 1025097 into twisted:trunk Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants