mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-21 04:51:13 +08:00
skip newline at end of code
This commit is contained in:
@@ -269,6 +269,11 @@ class FastParser(use_metaclass(CachedFastParser)):
|
||||
is_decorator = False
|
||||
|
||||
current_lines.append(l)
|
||||
if current_lines:
|
||||
# skip newline at end of code,
|
||||
# since it is not counted by Parser
|
||||
if not current_lines[-1]:
|
||||
del current_lines[-1]
|
||||
if current_lines:
|
||||
yield gen_part()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user