-
Notifications
You must be signed in to change notification settings - Fork 874
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
First mypy refactorings #1204
base: master
Are you sure you want to change the base?
First mypy refactorings #1204
Conversation
Codecov ReportBase: 93.74% // Head: 93.72% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1204 +/- ##
==========================================
- Coverage 93.74% 93.72% -0.03%
==========================================
Files 83 83
Lines 8407 8396 -11
==========================================
- Hits 7881 7869 -12
- Misses 526 527 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Thanks @rijkvandermeulen. It looks like a good way to do it. We'll try to review it sometime soon (we are a bit behind these days, apologies). We also will have to think whether the benefits (better type checks) over-weight the small cost (tracking all folders and dependencies in the ignore list, maintain the pre-commit hook). In any case I like your step-by-step approach! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just would be curious what is the runtime on whole project run --all-files
Current situation
I did a first investigation into the existing mypy errors and the amount of refactoring that would be required. Running mypy on the whole directory results in over 650 "errors". Some of these errors are super easy to fix, others will probably require slightly more effort.
Proposal
Curious to learn how you guys look at this, but in my opinion fixing >650 errors is quite a substantial effort for one PR. I'm therefore wondering whether it would make more sense to split this up into more "manageable" chunks? The way of working would then look something like:
[mypy-darts.timeseries.*] ignore_errors = True
. This would allow us to step by step improve.To make all of this more practical I've already took a shot on resolving the mypy issues for darts/dataprocessing/dtw and darts/dataprocessing/pipeline.py. As you'll see in the mypy.ini these directories/files are thus excluded from the "exception list" and hence mypy will check these files after each commit.
Looking forward to hearing your thoughts on this approach!