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

feature: Refine exposed protocol types #111

Conversation

aiven-anton
Copy link
Collaborator

By refining the exposed protocol types to include unions types for the different kinds of headers, we allow typing at call-sites to work smoother. This also enables using exhaustiveness checking in a place where it wasn't possible before, when matching the type of an entity's header schema. See the replaced NotImplementedError in the diff for reference.

@aiven-anton aiven-anton force-pushed the aiven-anton/feature-expose-improved-header-and-payload-types branch from 0540fd4 to ab35db6 Compare December 14, 2023 16:25
@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e064cad) 96.57% compared to head (165de2d) 96.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   96.57%   96.65%   +0.07%     
==========================================
  Files          14       14              
  Lines         994     1016      +22     
  Branches      138      138              
==========================================
+ Hits          960      982      +22     
  Misses         26       26              
  Partials        8        8              

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

src/kio/static/base.py Outdated Show resolved Hide resolved
@aiven-anton aiven-anton marked this pull request as draft January 3, 2024 14:35
@aiven-anton

This comment was marked as resolved.

@aiven-anton aiven-anton force-pushed the aiven-anton/feature-expose-improved-header-and-payload-types branch from ab35db6 to 5e5ea57 Compare January 11, 2024 16:15
@aiven-anton aiven-anton marked this pull request as ready for review January 11, 2024 16:17
@jjaakola-aiven jjaakola-aiven enabled auto-merge (squash) February 1, 2024 13:35
jjaakola-aiven
jjaakola-aiven previously approved these changes Feb 1, 2024
By refining the exposed protocol types to include unions types for the
different kinds of headers, we allow typing at call-sites to work
smoother. This also enables using exhaustiveness checking in a place
where it wasn't possible before, when matching the type of an entity's
header schema. See the replaced NotImplementedError in the diff for
reference.
@aiven-anton aiven-anton force-pushed the aiven-anton/feature-expose-improved-header-and-payload-types branch from 79ae094 to 165de2d Compare February 2, 2024 15:11
@aiven-anton aiven-anton requested review from a team as code owners February 2, 2024 15:11
@jjaakola-aiven jjaakola-aiven merged commit 4c69118 into main Feb 5, 2024
12 checks passed
@jjaakola-aiven jjaakola-aiven deleted the aiven-anton/feature-expose-improved-header-and-payload-types branch February 5, 2024 10:41
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.

4 participants