Commented out code not detected when code block is two lines long
jontwo opened this issue · comments
Jon Morris commented
Copied from wemake-services/flake8-eradicate#265:
If you paste the following code into a new file, flake8-eradicate
will only detect the first and the third code blocks. The second block, split over two lines is not detected.
# create_output_path(*os.path.split(mypath),
# overwrite=overwrite,
# exist_ok=True)
# create_output_path(*os.path.split(mypath), overwrite=overwrite,
# exist_ok=True)
# create_output_path(*os.path.split(mypath), overwrite=overwrite, exist_ok=True)
Repro steps
$ python3.8 -m venv ~/deleteme
$ source ~/deleteme/bin/activate
$ pip install flake8-eradicate
$ flake8 test.py --max-line-length=81
Expected result
Commented out code found on lines 2-4, 6-7, and 9.
Actual result
test.py:3:1: E800 Found commented out code
test.py:9:1: E800 Found commented out code