from math import log, sqrt
import numpy as np
from scipy.signal import argrelmax
# TOCONSIDER: See also smth smth
def my_function():
. . .
When isort is run on this, it deletes the line before # TOCONSIDER, causing a PEP8 violation.
I'm well aware that removing the line between the comment and the function or removing one before and adding one after fixes it, but maybe isort shouldn't do anything after the last valid import in case they don't belong to it? That looks more like flake8 territory.
Expected behavior
This chunk of code should remain intact:
from math import log, sqrt
import numpy as np
from scipy.signal import argrelmax
# TOCONSIDER: See also smth smth
def my_function():
. . .
We have a file that starts like this:
When isort is run on this, it deletes the line before
# TOCONSIDER
, causing a PEP8 violation.I'm well aware that removing the line between the comment and the function or removing one before and adding one after fixes it, but maybe isort shouldn't do anything after the last valid import in case they don't belong to it? That looks more like flake8 territory.
Expected behavior
This chunk of code should remain intact: