diff --git a/jedi/parsing.py b/jedi/parsing.py index b3f20e92..b6ab611b 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -1508,7 +1508,7 @@ class PyFuzzyParser(object): string += ' ' string += ".".join(n.names) continue - elif '=' in tok and not tok in ['>=', '<=', '==', '!=']: + elif tok.endswith('=') and not tok in ['>=', '<=', '==', '!=']: # there has been an assignement -> change vars if level == 0: set_vars = used_vars diff --git a/test/completion/types.py b/test/completion/types.py index a29c1511..04c17c95 100644 --- a/test/completion/types.py +++ b/test/completion/types.py @@ -23,6 +23,9 @@ r"".upper # strangely this didn't work, because the = is used for assignments #? ['upper'] "=".upper +a = "=" +#? ['upper'] +a.upper # -----------------