Skip to content

Conversation

rwbarton
Copy link
Contributor

@rwbarton rwbarton commented Jun 5, 2016

This required some follow-on changes that I don't totally understand,
but seem like simplifications.

This required some follow-on changes that I don't totally understand,
but seem like simplifications.
res = analyze_type_alias(s.rvalue,
self.lookup_qualified,
self.lookup_fully_qualified,
self.fail)
if res and (not isinstance(res, Instance) or cast(Instance, res).args):
if res:
Copy link
Member

Choose a reason for hiding this comment

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

IIUC the code you removed here was added in ab4a0fe and while some of the surrounding code was changed, it seems to guard against using e.g. List[AnyStr]. Can you check that either that's still prohibited or it actually works as expected?

@gvanrossum gvanrossum merged commit cd5876c into python:master Jun 6, 2016
@gvanrossum
Copy link
Member

I checked manually that List[AnyStr] is still considered invalid. So merging.

@ddfisher
Copy link
Collaborator

ddfisher commented Jun 6, 2016

It looks like this breaks type aliases defined inside of classes. I'm going to revert for now.

ddfisher added a commit that referenced this pull request Jun 6, 2016
This reverts commit cd5876c because
it breaks type aliases inside of classes.
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