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

Complete static typing #24

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open

Conversation

TeamSpen210
Copy link

@TeamSpen210 TeamSpen210 commented Mar 12, 2024

This adds type hints to all definitions in the package, as well as the tests. It passes mypy's strict mode, with some caveats:

  • _exceptions will break if you use newer trio versions due to the removal of MultiError.
  • compose_values() is untypable due to it creating new named tuples with every call. Therefore the attribute names aren't checked, but they produce the right value, and it is a tuple subclass.
  • Like the sync versions, azip()/azip_longest() just accurately types up to 5 arguments.
  • Mypy version is tricky. 1.4.0 is the latest supporting 3.7, but it gives some spurious errors. 1.8.0 is the last to drop support for checking 3.7 code, which does work, but not with the current CI setup. Not sure what to do here...

@codecov-commenter
Copy link

codecov-commenter commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c908bc7) to head (bb1b0ba).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #24   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines          454       528   +74     
=========================================
+ Hits           454       528   +74     

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

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.

2 participants