mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 15:24: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.
|
The option ``cut_own_trailer`` must be set to true for the second purpose.
|
||||||
"""
|
"""
|
||||||
trailer = leaf.parent
|
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
|
# 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
|
# different trailers: `( x )`, `[ x ]` and `.x`. In the first two examples
|
||||||
# we should not match anything more than x.
|
# we should not match anything more than x.
|
||||||
|
|||||||
@@ -25,3 +25,6 @@ Fr'sasdf'
|
|||||||
|
|
||||||
#? 7 str()
|
#? 7 str()
|
||||||
Fr'''sasdf''' + ''
|
Fr'''sasdf''' + ''
|
||||||
|
|
||||||
|
#? ['upper']
|
||||||
|
f'xyz'.uppe
|
||||||
|
|||||||
Reference in New Issue
Block a user