kr8s-org / kr8s

A batteries-included Python client library for Kubernetes that feels familiar for folks who already know how to use kubectl
https://kr8s.org
BSD 3-Clause "New" or "Revised" License
799 stars 43 forks source link

Run mypy on tests #492

Closed jacobtomlinson closed 1 week ago

jacobtomlinson commented 1 week ago

In order to work on #491 we are going to need to be able to test our type annotations. Currently tests are excluded from mypy. This PR adds them back in again.

There were a few failures, many related to the sync API annotations highlighted in #491. For now I've just removed the annotation from the test signature so that mypy skips as we do not enforce strict type checking yet (xref #428).

This PR should merge cleanly with no mypy failures, but will allow us to gradually introduce typing into the tests and therefore test the types.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.19%. Comparing base (87063fc) to head (f13d7e0). Report is 114 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #492 +/- ## ========================================== + Coverage 94.61% 95.19% +0.57% ========================================== Files 29 30 +1 Lines 3141 3973 +832 ========================================== + Hits 2972 3782 +810 - Misses 169 191 +22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.