DanCardin / cappa

Declarative CLI argument parser
Apache License 2.0
135 stars 8 forks source link

fix: Skip non-init fields in dataclasses. #183

Closed pawamoy closed 1 week ago

pawamoy commented 1 week ago

Closes #181.

pawamoy commented 1 week ago

The type-checking error could be fixed by changing the annotation of Field.metadata to Mapping, or by making an actual dict of metadata with dict(f.metadata). Or we can type-ignore it, let me know.

DanCardin commented 1 week ago

i'd probably dict it personally, for making a type that can be consistent across the various types.

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 100.00%. Comparing base (23a0be3) to head (ac2a2ea). Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #183 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 25 Lines 2308 2310 +2 Branches 500 501 +1 ========================================= + Hits 2308 2310 +2 ```

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


🚨 Try these New Features: