Fix a bug about fstring completion

This commit is contained in:
Dave Halter
2018-07-02 01:26:17 +02:00
parent 8ffdf6746f
commit 2b1cbe4d42
2 changed files with 7 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ def evaluate_call_of_leaf(context, leaf, cut_own_trailer=False):
The option ``cut_own_trailer`` must be set to true for the second purpose.
"""
trailer = leaf.parent
if trailer.type == 'fstring':
from jedi.evaluate import compiled
return compiled.get_string_context_set(context.evaluator)
# The leaf may not be the last or first child, because there exist three
# different trailers: `( x )`, `[ x ]` and `.x`. In the first two examples
# we should not match anything more than x.

View File

@@ -25,3 +25,6 @@ Fr'sasdf'
#? 7 str()
Fr'''sasdf''' + ''
#? ['upper']
f'xyz'.uppe