KEMBAR78
Widen type to Any when isinstance(..., Any) is True by miedzinski · Pull Request #3751 · python/mypy · GitHub
Skip to content

Conversation

miedzinski
Copy link
Contributor

Fixes #3474.


[builtins fixtures/isinstance.pyi]

[case testIsinstanceWidensWithAnyArg]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good fix, but could you please add few more tests:

  • With an error and # type: ignore
  • With an "un-imported" Any
  • With an initial type that is not a union

@ilevkivskyi
Copy link
Member

This appeared again, are you still working on this PR?

@JukkaL
Copy link
Collaborator

JukkaL commented Nov 15, 2017

@miedzinski Are you interested in finishing this PR?

@miedzinski
Copy link
Contributor Author

@JukkaL Yes, I am. I have merged master into my branch and will look into this weekend.

@miedzinski
Copy link
Contributor Author

@ilevkivskyi Do you have any ideas for more test cases?

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ilevkivskyi ilevkivskyi merged commit 0bbf714 into python:master Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants