gforcada/flake8-isort

Plugin doesn't correctly deal with the add_imports directive

Closed this issue · 0 comments

isort provides an add_imports directive that is useful to enforce some imports to be present (e.g. __future__.unicode_literals). However adding lines to this directive makes them appear at the end of isort.SortImports.in_lines which confuses the _fixup_sortimports_eof logic.

I have a patch I plan to submit which makes _fixup_sortimports_eof consider sort_imports.add_imports as well.