mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-18 11:35:57 +08:00
fixed a bug related to string literal tokens with = in them
This commit is contained in:
@@ -709,7 +709,7 @@ class Statement(Simple):
|
|||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
if tok in ['return', 'yield'] or level == 0 and \
|
if tok in ['return', 'yield'] or level == 0 and \
|
||||||
'=' in tok and not tok in ['>=', '<=', '==', '!=']:
|
tok.endswith('=') and not tok in ['>=', '<=', '==', '!=']:
|
||||||
# This means, there is an assignment here.
|
# This means, there is an assignment here.
|
||||||
|
|
||||||
# Add assignments, which can be more than one
|
# Add assignments, which can be more than one
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ float.is_int
|
|||||||
#? ['upper']
|
#? ['upper']
|
||||||
r"".upper
|
r"".upper
|
||||||
|
|
||||||
|
# strangely this didn't work, because the = is used for assignments
|
||||||
|
#? ['upper']
|
||||||
|
"=".upper
|
||||||
|
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# lists
|
# lists
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user