Skip to content

Support MyPy New Semantic Analyzer #27018

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

Closed
WillAyd opened this issue Jun 24, 2019 · 2 comments · Fixed by #27070
Closed

Support MyPy New Semantic Analyzer #27018

WillAyd opened this issue Jun 24, 2019 · 2 comments · Fixed by #27070
Labels
Typing type annotations, mypy/pyright type checking
Milestone

Comments

@WillAyd
Copy link
Member

WillAyd commented Jun 24, 2019

MyPy recently released a new semantic analyzer in v0.710:

https://mypy-lang.blogspot.com/2019/06/mypy-0710-released-new-semantic-analyzer.html

This will likely be the default in the next mypy release so would be good to get a head start on support. This currently causes a few errors in our code base:

$ mypy --new-semantic-analyzer pandas
pandas/core/arrays/interval.py:574: error: Name 'dtype' already defined on line 129
pandas/core/indexes/timedeltas.py:308: error: Name '_box_func' already defined on line 173
pandas/io/json/__init__.py:5: error: Name 'json' is not defined
pandas/io/json/__init__.py:5: error: Name 'normalize' is not defined
pandas/io/json/__init__.py:5: error: Name 'table_schema' is not defined
@WillAyd WillAyd added the Typing type annotations, mypy/pyright type checking label Jun 24, 2019
@WillAyd WillAyd added this to the Contributions Welcome milestone Jun 24, 2019
@alimcmaster1
Copy link
Member

Interesting I can take a look @WillAyd we can validate in CI too so this doesn't regress between now and next mypy release

@WillAyd
Copy link
Member Author

WillAyd commented Jun 26, 2019 via email

@jreback jreback modified the milestones: Contributions Welcome, 0.25.0 Jun 27, 2019
@jreback jreback modified the milestones: Contributions Welcome, 0.25.0 Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants