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

🔧 Improve typing #101

Merged
merged 11 commits into from Jan 1, 2023
Merged

🔧 Improve typing #101

merged 11 commits into from Jan 1, 2023

Conversation

zschumacher
Copy link
Owner

@zschumacher zschumacher commented Dec 14, 2022

Overview

I naively implemented typing. It was time to give it some much needed attention. Now IDEs and mypy will correctly interpret types for all methods on Commands and CommandsAsync except for query_multiple and query_multiple_async. I have a TODO to explore variadic typevars (TypeVarTuple) for this in the future.

Changes

  • Leverage TypeVar to provide a better typing experience on Commands and CommandsAsync
  • Add an annotations test to CI for validating some of the more complex type annotations are outputting what I would expect

Zach Schumacher added 2 commits December 12, 2022 23:41
@zschumacher zschumacher marked this pull request as draft December 14, 2022 02:42
Zach Schumacher added 2 commits December 13, 2022 21:58
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2022

Codecov Report

Base: 100.00% // Head: 99.64% // Decreases project coverage by -0.35% ⚠️

Coverage data is based on head (6882721) compared to base (1338a1d).
Patch coverage: 94.44% of modified lines in pull request are covered.

❗ Current head 6882721 differs from pull request most recent head 170d237. Consider uploading reports for the commit 170d237 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #101      +/-   ##
===========================================
- Coverage   100.00%   99.64%   -0.36%     
===========================================
  Files           18       18              
  Lines          539      556      +17     
  Branches        91       93       +2     
===========================================
+ Hits           539      554      +15     
- Misses           0        2       +2     
Flag Coverage Δ
3.10 99.46% <94.44%> (-0.36%) ⬇️
3.11 99.46% <94.44%> (-0.36%) ⬇️
3.7 99.63% <94.44%> (-0.37%) ⬇️
3.8 99.63% <94.44%> (-0.37%) ⬇️
3.9 99.63% <94.44%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pydapper/mysql/mysql_connector_python.py 100.00% <ø> (ø)
pydapper/utils.py 95.34% <83.33%> (-4.66%) ⬇️
pydapper/commands.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zschumacher zschumacher marked this pull request as ready for review January 1, 2023 03:16
@zschumacher zschumacher merged commit bee8662 into main Jan 1, 2023
@zschumacher zschumacher deleted the improve-typing branch January 1, 2023 23:57
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.

None yet

2 participants