-
Notifications
You must be signed in to change notification settings - Fork 36
Enhance typing for mediafile.fields
#97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
for the mutagen file type.
Moved null value into constants
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #97 +/- ##
==========================================
+ Coverage 93.26% 93.34% +0.08%
==========================================
Files 16 17 +1
Lines 817 842 +25
Branches 118 115 -3
==========================================
+ Hits 762 786 +24
+ Misses 35 34 -1
- Partials 20 22 +2
|
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
This PR adds more comprehensive typing to the
mediafile/fields.pymodule using generics. Fields are now typed asMediaField[T]whereTcorresponds to theout_typeof the field. This allows type checkers and IDEs to more accurately infer field types.Example:
Most fields are still
MediaField[unknown], but this PR is a partial step toward fully typed fields. Additional PRs will follow to further improve typing across mediafile.Now might be a good time to have a look at this to not increase the review burden too much.