wimglenn / advent-of-code-data

Get your Advent of Code data with a single import statement
MIT License
515 stars 54 forks source link

Provide type annotations for the public API #131

Closed mjpieters closed 10 months ago

mjpieters commented 11 months ago

The package now includes a PEP 561 py.typed flag file to let type checkers know that this package provides type annotations.

The annotations provide full coverage for all public functions and classes in the aocd package, with the library reaching 100% coverage as per pyright --ignoreexternal --verifytypes.

A few notes on this PR:

Resolves #78

codecov[bot] commented 11 months ago

Codecov Report

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

Comparison is base (34d73e3) 91.56% compared to head (589325a) 91.72%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #131 +/- ## ========================================== + Coverage 91.56% 91.72% +0.15% ========================================== Files 24 25 +1 Lines 2656 2706 +50 Branches 357 358 +1 ========================================== + Hits 2432 2482 +50 Misses 159 159 Partials 65 65 ```

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

mjpieters commented 11 months ago

I managed to completely miss the other PR here, #123. I'll take a look to see what is different between mine and that one.

mjpieters commented 11 months ago

The difference between this PR and #123 is that this PR is much more limited in scope. It only aims to provide type annotations for consumers of the library, not for the library itself.

See it as a multi-step process; type hinting for internal use could be added separately. This makes this PR a lot smaller.

wimglenn commented 10 months ago

@mjpieters I will likely merge this PR first and then rebase the other one on your changes. Could you address/resolve these review comments first, though?