-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add mypy #152
Add mypy #152
Conversation
Codecov Report
@@ Coverage Diff @@
## master #152 +/- ##
==========================================
- Coverage 79.31% 79.29% -0.03%
==========================================
Files 22 22
Lines 1615 1618 +3
Branches 284 284
==========================================
+ Hits 1281 1283 +2
- Misses 288 289 +1
Partials 46 46
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #152 +/- ##
==========================================
- Coverage 81.79% 81.76% -0.04%
==========================================
Files 23 23
Lines 1637 1634 -3
Branches 291 290 -1
==========================================
- Hits 1339 1336 -3
Misses 246 246
Partials 52 52
Continue to review full report at Codecov.
|
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 not sure about the benefits, mostly because:
- Only a few variables/attributes are typed
- There are some
#type: ignore
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.
What's the error in mypy for every line with # type: ignore
?
I agree with @ejulio and think it's better to either not have # type: ignore
at all or don't use mypy.
Last thing - adding mypy check to tox like here https://github.com/scrapinghub/arche/compare/mypy
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.
Add this check to travis.yml
Awesome. |
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.
I cleaned some redundant castings and made sure it works in travis. Good work, I am merging.
Fixes #145
This PR will add mypy and fix type errors. I was running mypy locally this way:
$ mypy src/arche --ignore-missing-imports
.