Skip to content

Fix #2998: correctly handle MemberExpr in infer_partial_type #3064

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
Mar 28, 2017

Conversation

refi64
Copy link
Contributor

@refi64 refi64 commented Mar 27, 2017

No description provided.

@JukkaL
Copy link
Collaborator

JukkaL commented Mar 27, 2017

Can you look at the build failures?

@refi64
Copy link
Contributor Author

refi64 commented Mar 27, 2017

Looks like it's just testInferListInitializedToEmptyInMethodViaAttribute:

class A:
    def f(self) -> None:
        # Attributes aren't supported right now.
        self.a = [] # E: Need type annotation for variable
        self.a.append(1) # E: Cannot determine type of 'a'
        self.a.append('') # E: Cannot determine type of 'a'

since the last two simply silently exit (which IMO is correct, since cascading errors are annoying). @JukkaL Do you have any objections to me changing it?

@refi64
Copy link
Contributor Author

refi64 commented Mar 28, 2017

I'll take that as a yes...

@gvanrossum gvanrossum merged commit 2c686e8 into python:master Mar 28, 2017
@gvanrossum
Copy link
Member

Thanks again!

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