Better goto definition for fstrings

This commit is contained in:
Dave Halter
2018-04-07 12:40:52 +02:00
parent ec1c6e1e4d
commit 806ae13b71
2 changed files with 2 additions and 2 deletions

View File

@@ -195,7 +195,7 @@ def evaluate_goto_definition(evaluator, context, leaf):
return evaluate_call_of_leaf(context, leaf) return evaluate_call_of_leaf(context, leaf)
elif isinstance(leaf, tree.Literal): elif isinstance(leaf, tree.Literal):
return eval_atom(context, leaf) return eval_atom(context, leaf)
elif leaf.type == 'fstring_string': elif leaf.type in ('fstring_string', 'fstring_start', 'fstring_end'):
return get_string_context_set(evaluator) return get_string_context_set(evaluator)
return [] return []

View File

@@ -23,5 +23,5 @@ Fr'a{Foo.bar'
#? str() #? str()
Fr'sasdf' Fr'sasdf'
#? 7 #? 7 str()
Fr'''sasdf''' + '' Fr'''sasdf''' + ''