-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Handle python 3.6 f-strings without error #2622
Changes from 1 commit
fc03182
31e0252
6c4aa78
2112398
025c948
e8cb282
d6ba5fd
25043d4
8f17a4c
4847e27
5534c1a
5567215
929c5ef
2c73695
47d592a
0867026
8a17249
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1157,6 +1157,15 @@ b'%c' % (123) | |
[case testUnicodeInterpolation_python2] | ||
u'%s' % (u'abc',) | ||
|
||
|
||
-- F-String | ||
-- -------- | ||
|
||
|
||
[case testFStringParseOk] | ||
a = f'foobar' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need Can you also add tests showing that the expressions in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PS. To quickly run just this test, try: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the tip, better than I've just added another test to check type checking of expressions but I can't get it working. However running the test with
It doesn't use python 3.6 syntax. How can I specify it in the tests? |
||
|
||
|
||
-- Lambdas | ||
-- ------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole method should be inside something like
if hasattr(ast35, 'JoinedStr'):
so that mypy will still work with the previous version of typed_ast.