flucto-gmbh / heisskleber

MIT License
0 stars 1 forks source link

Turn sources into iterators #109

Closed pacjac closed 6 months ago

pacjac commented 7 months ago

This PR adds iter to the Source baseclass and aiter to the AsyncSource baseclass. The function is already implemented and does not need to be overridden, as it simply calls self.receive() and yields the result.

Also modifies the Serializable type to be int | float, removing the pesky str from the definition. Should be redone properly in a future iteration.

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 56.99%. Comparing base (26a1127) to head (89ce75e).

Files Patch % Lines
heisskleber/core/types.py 44.44% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #109 +/- ## ========================================== - Coverage 57.10% 56.99% -0.11% ========================================== Files 45 45 Lines 1422 1430 +8 Branches 133 133 ========================================== + Hits 812 815 +3 - Misses 562 567 +5 Partials 48 48 ```

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