Skip to content

Allow calling Type[T] where T has generic bound #5309

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
Aug 2, 2018

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