diff --git a/jedi/parser/user_context.py b/jedi/parser/user_context.py index cad62499..3cb24a7c 100644 --- a/jedi/parser/user_context.py +++ b/jedi/parser/user_context.py @@ -104,7 +104,8 @@ class UserContext(object): # The same is true for string prefixes -> represented as a # combination of string and name. if tok_type == tokenize.NUMBER and tok_str[-1] == '.' \ - or tok_type == tokenize.NAME and last_type == tokenize.STRING: + or tok_type == tokenize.NAME and last_type == tokenize.STRING \ + and tok_str.lower() in ('b', 'u', 'r', 'br', 'ur'): force_point = False else: break diff --git a/test/test_api/test_call_signatures.py b/test/test_api/test_call_signatures.py index 24f06573..46d55e76 100644 --- a/test/test_api/test_call_signatures.py +++ b/test/test_api/test_call_signatures.py @@ -209,6 +209,13 @@ class TestCallSignatures(TestCase): self._run(source, 'test2', 0) + def test_return(self): + source = dedent(''' + def foo(): + return '.'.join()''') + + self._run(source, 'join', 0, column=len(" return '.'.join(")) + class TestParams(TestCase): def params(self, source, line=None, column=None):