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

Start getting mypy --strict passing #429

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Jul 2, 2024

Taking first steps towards #428.

I started this PR by adding some type annotations to tests before deciding to just exclude tests, but I don't see ay harm in leaving those changes in.

I think the only thing we really care about is having good type annotations on the kr8s module itself, so I've excluded all other Python code from mypy linting.

Other typing fixes here include using __all__ to explicitly re-export things at the kr8s and kr8s.asyncio levels and adding annotations to the exceptions submodule.

After this PR there are 237 errors when running mypy --strict ..

Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 93.47826% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.28%. Comparing base (87063fc) to head (827391b).
Report is 119 commits behind head on main.

Files with missing lines Patch % Lines
kr8s/_objects.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
+ Coverage   94.61%   95.28%   +0.66%     
==========================================
  Files          29       30       +1     
  Lines        3141     3666     +525     
==========================================
+ Hits         2972     3493     +521     
- Misses        169      173       +4     

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

@jacobtomlinson jacobtomlinson merged commit 501af87 into kr8s-org:main Jul 2, 2024
11 checks passed
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.

1 participant