Support mypy annotations using comment syntax
This allows us to use mypy annotations for completion in Python 2. Closes #946
This commit is contained in:
1 parent
d0b8f9e5a2
commit
b9903ede1b
3 files changed
+145
-2
No files matched your search
@@ -201,6 +201,9 @@ def get_following_comment_same_line(node):
|
||||
whitespace = node.children[5].get_first_leaf().prefix
|
||||
elif node.type == 'with_stmt':
|
||||
whitespace = node.children[3].get_first_leaf().prefix
|
||||
elif node.type == 'funcdef':
|
||||
# actually on the next line
|
||||
whitespace = node.children[4].get_first_leaf().get_next_leaf().prefix
|
||||
else:
|
||||
whitespace = node.get_last_leaf().get_next_leaf().prefix
|
||||
except AttributeError:
|
||||
|
||||
Reference in new issue
Block a user