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

Parse each format-string component separately #3390

Merged
merged 5 commits into from May 30, 2017
Jump to file or symbol
Failed to load files and symbols.
+2 −3
Diff settings

Always

Just for now

Viewing a subset of changes. View all

test f-string type using reveal_type

  • Loading branch information...
lincolnq committed May 22, 2017
commit dada4e4f87ab397b8fbfe0247c9175e5a401fed1
@@ -147,8 +147,7 @@ f'result: {value:{width}.{precision}}'
[case testNewSyntaxFStringSingleField]
# flags: --python-version 3.6
v = 1
f'{v}' + ''
f'{1}' + ''
f' {v}' + ''
reveal_type(f'{v}') # E: Revealed type is 'builtins.str'
reveal_type(f'{1}') # E: Revealed type is 'builtins.str'
[builtins fixtures/f_string.pyi]
ProTip! Use n and p to navigate between commits in a pull request.