fisadev / vim-isort

Vim plugin to sort python imports using https://github.com/timothycrosley/isort
MIT License
219 stars 32 forks source link

Account for isort:skip_file #26

Closed conradho closed 6 years ago

conradho commented 6 years ago

Currently SortImports(file_contents=old_text).output returns None if isort:skip_file is present within the file being edited. This causes the new_lines = new_text.split('\n') a couple lines down to error with a AttributeError: 'NoneType' object has no attribute 'split' error. This guards against it.

fisadev commented 6 years ago

Thanks a lot!