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

Experiment with type stubs for the sync API #493

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jacobtomlinson
Copy link
Member

I spent some time today experimenting with type stubs for the sync API (see #491).

This PR adds type stubs for the sync objects API. Right now it only implements the list() method on each object.

I then confirmed in kr8s/tests/test_objects.py::test_sync_pod_list that mypy is happy with these annotations.

The next step it to make a script that autogenerates these stubs based on the source files.

cc @florianvazelle for visibility

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

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

Project coverage is 95.16%. Comparing base (87063fc) to head (196f2d4).
Report is 123 commits behind head on main.

Files with missing lines Patch % Lines
kr8s/objects.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #493      +/-   ##
==========================================
+ Coverage   94.61%   95.16%   +0.54%     
==========================================
  Files          29       30       +1     
  Lines        3141     3988     +847     
==========================================
+ Hits         2972     3795     +823     
- Misses        169      193      +24     

☔ 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant