diff --git a/jedi/evaluate/helpers.py b/jedi/evaluate/helpers.py index d1c8b64a..5d3f39d2 100644 --- a/jedi/evaluate/helpers.py +++ b/jedi/evaluate/helpers.py @@ -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. diff --git a/test/completion/fstring.py b/test/completion/fstring.py index 52e81123..818ee27f 100644 --- a/test/completion/fstring.py +++ b/test/completion/fstring.py @@ -25,3 +25,6 @@ Fr'sasdf' #? 7 str() Fr'''sasdf''' + '' + +#? ['upper'] +f'xyz'.uppe