-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: added type hints #106
Conversation
Honestly not entirely sure how asserts improve anything here, besides making things a bit visually ugly. |
The asserts mean we can have the correct type for all on the returns, without it I would need to just use Any which in my eyes defeats the point of using types. That said, I do agree that it's ugly and seems unnecessary but seems this is a limitation with typing, there are quite a few posts about it online. |
Given this unfortunate fact... In the interests of DRY, we should have a helper function that is basically |
Yea that is what I'm going to work on next. |
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.32%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Might not be able to review this week - I'm currently in the process of moving houses. I'll get to it as soon as possible. |
Description
This PR Adds Type hints.
Some arguments have been updated to allow better support of type hints, this change will only allow correct values to be specified for these items listed below:
sort_dir
sort_keys
artist_monitor
commands
Now accepts datetime instead of strings where a date is required.
Related issues
Motivation and Context
By adding support for type hints the module is easier to use and ensure the correct data is provided / returned.
How has this been tested
Testing still on-going
Types of changes
Checklist