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

Projects
None yet
3 participants
@msullivan
Collaborator

msullivan commented May 2, 2018

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?

Fix refresh of functions with 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?

@msullivan msullivan requested review from JukkaL and gvanrossum May 2, 2018

@gvanrossum

See what Jukka says.

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

This comment has been minimized.

@gvanrossum

gvanrossum May 2, 2018

Member

Spaces around = here.

@ilevkivskyi

LGTM!

@msullivan msullivan merged commit 66d70c7 into master May 3, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@msullivan msullivan deleted the implicit_optional branch May 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment