mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Fix a bug about fstring completion
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -25,3 +25,6 @@ Fr'sasdf'
|
||||
|
||||
#? 7 str()
|
||||
Fr'''sasdf''' + ''
|
||||
|
||||
#? ['upper']
|
||||
f'xyz'.uppe
|
||||
|
||||
Reference in New Issue
Block a user