-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Typing: Support New Mypy Semantic Analyzer #27070
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
Conversation
alimcmaster1
commented
Jun 26, 2019
- closes Support MyPy New Semantic Analyzer #27018
Does this cause Mypy failures? Wasn’t think we’d add this as a setting as much as just fix the errors that using it would cause |
^ I'm just checking that it does cause failures. This way we can verify i've actually fixed the issues |
Codecov Report
@@ Coverage Diff @@
## master #27070 +/- ##
==========================================
- Coverage 92.04% 92.03% -0.01%
==========================================
Files 180 180
Lines 50714 50714
==========================================
- Hits 46680 46675 -5
- Misses 4034 4039 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #27070 +/- ##
==========================================
+ Coverage 91.87% 92.03% +0.16%
==========================================
Files 180 180
Lines 50834 50714 -120
==========================================
- Hits 46703 46675 -28
+ Misses 4131 4039 -92
Continue to review full report at Codecov.
|
Gotcha. Just FYI you can also run |
first two errors removed, unsure of how to deal with the mypy error
Due to the fact we have: ( in our init.py)
Any advice @WillAyd ? |
Does converting the imports to abolute help at all? Seems like kind of a strange init file - maybe modeling it after pandas.io.excel would help and allow for removal of noqa |
Hello @alimcmaster1! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-07-07 20:44:20 UTC |
Just remove the noqa - shouldn't need them |
Latest test failures seem unrelated: ( currently looking )
|
Code changes look good. Can you remove changes to mypy.ini and any requirements files? @jreback any objection to renaming of files in json folder? |
no objections |
Thanks for the review @WillAyd . Just for my understanding what’s your motivation for removing the changes to mypy.ini it’s whats validating the mypy semantic analysis in CI - to avoid anyone introducing further errors? Thanks |
Because we don't need to really pin a dependency here. Any of these changes are backwards compatible we are just preventing future mypy versions from breaking; no need to force a min version |
pandas/io/json/__init__.py
Outdated
read_json, | ||
to_json, | ||
json_normalize, | ||
build_table_schema |
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.
those should be strings I think?
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.
Updated
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.
lgtm - over to you @jorisvandenbossche
@alimcmaster1 isn't the commit adding the semantic analyzer removed? IOW this doesn't look like it is triggering it. |
I asked to remove the semantic analyzer from the config because it naturally becomes the default in the next Mypy release. Figured no need to set then and not setting maintains better backwards compat |
ok, then we should set a min on mypy (when this comes out)? or at least on our CI do that? |
We don’t have to. The new analyzer is more strict so anything done here works with or without it.
But yea if we wanted to play it safe could set min version to next release when it comes out
…Sent from my iPhone
On Jul 5, 2019, at 11:51 AM, Jeff Reback ***@***.***> wrote:
I asked to remove the semantic analyzer from the config because it naturally becomes the default in the next Mypy release. Figured no need to set then and not setting maintains better backwards compat
ok, then we should set a min on mypy (when this comes out)? or at least on our CI do that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Updated as per your comments and green @jreback |
thanks @alimcmaster1 |