KEMBAR78
Allow calling Type[T] where T has generic bound by elazarg · Pull Request #5309 · python/mypy · GitHub
Skip to content

Conversation

@elazarg
Copy link
Contributor

@elazarg elazarg commented Jul 3, 2018

Fix #3631 : looks like it was an explicit decision, made before we had self types.

The code modified in this PR was introduced here at #1569. There are no tests for the current behavior, and it seems like we actually want to allow it.

I did not add tests for classmethod/staticmethod since it's unrelated (and it works).

@ilevkivskyi ilevkivskyi self-requested a review July 4, 2018 12:04
@ilevkivskyi ilevkivskyi self-assigned this Jul 4, 2018
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.

Thanks! I think just removing the error in this case makes sense. I would go even further and move the error to typeanal.py because it logically belongs there (but this is probably a low priority refactoring).

@ilevkivskyi ilevkivskyi merged commit 573be3e into python:master Aug 2, 2018
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.

2 participants