Skip to content

Conversation

@ilevkivskyi
Copy link
Member

This PR fixes insufficient traversal of synthetic TypeInfos in fine grained mode.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

LGTM

from typing import NamedTuple
from b import B

NT = NamedTuple('NT', [('x', B)])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe also try revealing the type of the x attribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added separate test (since reveal_type is an error and affects how targets are processed). This reminded me about an old question/TODO in typeanal.py. We still keep UnboundTypes in some places instead of replacing them with Any. Maybe we should stop doing this?(Note this requires updating many test cases.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, we should probably stop doing this at some point.

@ilevkivskyi ilevkivskyi merged commit c1f48a0 into python:master Jan 2, 2019
@ilevkivskyi ilevkivskyi deleted the fix-fine-synthetic branch January 2, 2019 18:54
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