Fix #667 - Do not add extra blank lines for add_blank_lines_for_python_control_statements

This commit is contained in:
w0rp
2017-06-20 09:39:58 +01:00
parent b44bd4e24f
commit b96f5845ed
2 changed files with 30 additions and 1 deletions

View File

@@ -83,3 +83,29 @@ Expect python(Newlines should be added):
pass
else:
pass
Given python(A file with a main block):
import os
def main():
print('hello')
if __name__ == '__main__':
main()
Execute(Fix the file):
let g:ale_fixers = {'python': ['add_blank_lines_for_python_control_statements']}
ALEFix
Expect python(extra newlines shouldn't be added to the main block):
import os
def main():
print('hello')
if __name__ == '__main__':
main()