aai-institute / lakefs-spec

An fsspec implementation for the lakeFS project.
http://lakefs-spec.org/
Apache License 2.0
37 stars 4 forks source link

Remove Placeholder from interface typing, use new ReferenceType hint #245

Closed nicholasjng closed 6 months ago

nicholasjng commented 6 months ago

As a consequence of my complaints upstream, a new ReferenceType was added, which is the union of str and everything that marks a reference in lakefs Python code (branches, tags, commits). We now use this everywhere, as it saves space in the interfaces.

Also, since the placeholder is ducktyped to be a ReferenceType always, and passes type checks at runtime (isinstance only), the typing could be relaxed to work with the native reference type only.

Part of #233.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a066705) 93.39% compared to head (88a8e34) 94.08%.

Files Patch % Lines
src/lakefs_spec/transaction.py 85.71% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #245 +/- ## ========================================== + Coverage 93.39% 94.08% +0.69% ========================================== Files 5 5 Lines 409 406 -3 Branches 70 70 ========================================== Hits 382 382 + Misses 18 15 -3 Partials 9 9 ```

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