Skip to content
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

Fix refresh of functions with implicit optional arguments #4993

Merged
merged 2 commits into from
May 3, 2018

Conversation

msullivan
Copy link
Collaborator

Type analysis would clear t.optional, so it wouldn't be there on
future runs.

This bug also apparently caused __new__ methods to not pick up
Optional from implicit optional arguments?

Type analysis would clear t.optional, so it wouldn't be there on
future runs.

This bug also apparently caused `__new__` methods to not pick up
Optional from implicit optional arguments?
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

See what Jukka says.

[case testImplicitOptionalRefresh1]
# flags: --strict-optional
from x import f
def foo(x: int=None) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Spaces around = here.

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.

LGTM!

@msullivan msullivan merged commit 66d70c7 into master May 3, 2018
@msullivan msullivan deleted the implicit_optional branch May 3, 2018 23:26
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