wemake-services / flake8-eradicate

Flake8 plugin to find commented out or dead code
https://pypi.org/project/flake8-eradicate/
MIT License
310 stars 12 forks source link

False-Positive E800 in multiline docstring based on content #270

Open manuelmaurer opened 2 years ago

manuelmaurer commented 2 years ago
$ flake8 --version
5.0.4 (flake8-eradicate: 1.4.0, mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: 2.5.0) CPython 3.9.15 on Linux

Working Code:

"""
#
# Copyright (c) 2022. All rights reserved.
#
# Project:    Test project
# Created:    2022-09-23
#
# @package
# @subpackage
# @author
#
"""

Output:

$ flake8
$ echo $?
0

Failing Code (Only date changed):

"""
#
# Copyright (c) 2022. All rights reserved.
#
# Project:    Test project
# Created:    2022-11-23
#
# @package
# @subpackage
# @author
#
"""

Output:

$ flake8
./main.py:6:1: E800 Found commented out code
$ echo $?
1

same thing happens if project is changed to a single word (e.g. test-project). Seems to be somehow related to the colons after Project/Created, if I remove them the errors disappear.