Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations #95

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Add type annotations #95

merged 2 commits into from
Jun 11, 2024

Conversation

jwodder
Copy link
Member

@jwodder jwodder commented Jun 11, 2024

Closes #47.

@jwodder jwodder marked this pull request as draft June 11, 2024 12:48
@jwodder jwodder marked this pull request as ready for review June 11, 2024 12:58
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.61%. Comparing base (1c0bfee) to head (edc47ca).

Files Patch % Lines
src/duct.py 97.61% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   87.54%   86.61%   -0.94%     
==========================================
  Files           1        1              
  Lines         265      269       +4     
  Branches       41       41              
==========================================
+ Hits          232      233       +1     
- Misses         25       28       +3     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

) -> Tuple[Union[TextIO, TailPipe, int], Union[TextIO, TailPipe, int]]:
stdout: Union[TextIO, TailPipe, int]
stderr: Union[TextIO, TailPipe, int]
) -> tuple[TextIO | TailPipe | int | None, TextIO | TailPipe | int | None]:
Copy link
Member

Choose a reason for hiding this comment

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

why tuple instead of typing.Tuple?

Copy link
Member Author

Choose a reason for hiding this comment

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

The typing types for builtins (Dict, Tuple, List, etc.) are all deprecated in favor of just using the types themselves.

@asmacdo
Copy link
Member

asmacdo commented Jun 11, 2024

Thank you!!!!

@asmacdo asmacdo merged commit 31bd298 into con:main Jun 11, 2024
29 of 30 checks passed
@jwodder jwodder deleted the typing branch June 11, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fill out type checking
2 participants