Skip to content

REF: raise scalar_data_error to make mypy happy #28484

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

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

jbrockmendel
Copy link
Member

@simonjayhawkins do I need to update a config file or enable something?

@WillAyd
Copy link
Member

WillAyd commented Sep 17, 2019

Have you tried using NoReturn for the return value of _scalar_data_error? It wasn't added until Python 3.5.4 so will fail the CI pinned to 3.5.3, but could be reasonable to use going into 1.0.0

@jbrockmendel
Copy link
Member Author

I haven't tried that, will look into it for future reference. In this particular case I agree with mypy that this is clearer than the status quo

@simonjayhawkins
Copy link
Member

In this particular case I agree with mypy that this is clearer than the status quo

tend to agree, although the NoReturn is intended for patterns like this.

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Sep 17, 2019
@simonjayhawkins simonjayhawkins added this to the 1.0 milestone Sep 17, 2019
@simonjayhawkins
Copy link
Member

lgtm. @WillAyd

@WillAyd WillAyd merged commit 6e7fdec into pandas-dev:master Sep 17, 2019
@WillAyd
Copy link
Member

WillAyd commented Sep 17, 2019

Thanks!

@jbrockmendel jbrockmendel deleted the mpbase branch September 17, 2019 16:22
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 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 this pull request may close these issues.

3 participants