I am trying to make flakehell lint command ignore previous errors and warnings. I just created a main.py file with a code that is not clean:
from sys import * unused_var = 55 used = 45 addition =66 def Somme(addnumberoneinordertogenerateanerror, b): return addnumberoneinordertogenerateanerror+b print(Somme(used, addition))
my pyproject.toml file
[tool.flakehell] baseline = "baseline.txt" format = "grouped" max_line_length = 88 [tool.flakehell.plugins] pycodestyle = ["+*"] "flake8-*" = ["+*"] pep8-naming = ["+*"] pyflakes = ["+*"] pylint = ["+*"]
when I run flakehell lint command I get this output:
(venv) PS C:\Dev_workspace\tests_and_Tuto\flakehell> flakehell lint .\main.py 5: 11 E225 missing whitespace around operator [pycodestyle] 8: 48 E226 missing whitespace around arithmetic operator [pycodestyle] 7: 1 E302 expected 2 blank lines, found 1 [pycodestyle] 10: 1 E305 expected 2 blank lines after class or function definition, found 1 [pycodestyle] 10: 29 W292 no newline at end of file [pycodestyle] 1: 1 F401 'sys.*' imported but unused [pyflakes] 1: 1 F403 'from sys import *' used; unable to detect undefined names [pyflakes]
I ran the command:
flakehell baseline > baseline.txt
and this generated a file baseline.txt that I have added it to [tool.flakehell] in pyproject.toml file when I run
flakehell lint
I am getting the same previous output, while I am expecting to get nothing since the previous errors must be ignored because of the baseline.txt file.
what am I doing wrong in that case?
other thing to mention I have these versions installed (I need to work with them for a bigger project):
python 3.10.0
flake8 3.9.0
flakehell 0.8.0
I am trying to make flakehell lint command ignore previous errors and warnings. I just created a main.py file with a code that is not clean:
from sys import * unused_var = 55 used = 45 addition =66 def Somme(addnumberoneinordertogenerateanerror, b): return addnumberoneinordertogenerateanerror+b print(Somme(used, addition))my pyproject.toml file
[tool.flakehell] baseline = "baseline.txt" format = "grouped" max_line_length = 88 [tool.flakehell.plugins] pycodestyle = ["+*"] "flake8-*" = ["+*"] pep8-naming = ["+*"] pyflakes = ["+*"] pylint = ["+*"]when I run flakehell lint command I get this output:
(venv) PS C:\Dev_workspace\tests_and_Tuto\flakehell> flakehell lint .\main.py 5: 11 E225 missing whitespace around operator [pycodestyle] 8: 48 E226 missing whitespace around arithmetic operator [pycodestyle] 7: 1 E302 expected 2 blank lines, found 1 [pycodestyle] 10: 1 E305 expected 2 blank lines after class or function definition, found 1 [pycodestyle] 10: 29 W292 no newline at end of file [pycodestyle] 1: 1 F401 'sys.*' imported but unused [pyflakes] 1: 1 F403 'from sys import *' used; unable to detect undefined names [pyflakes]I ran the command:
flakehell baseline > baseline.txtand this generated a file baseline.txt that I have added it to [tool.flakehell] in pyproject.toml file when I run
flakehell lint
I am getting the same previous output, while I am expecting to get nothing since the previous errors must be ignored because of the baseline.txt file.
what am I doing wrong in that case?
other thing to mention I have these versions installed (I need to work with them for a bigger project):
python 3.10.0
flake8 3.9.0
flakehell 0.8.0