Replace flake8 with flakeheaven in linting steps (#1625)

* replace flake8 with flakeheaven

* update pyproject.toml for new flake tool

* update lock file

* change flake8 to flakeheaven in tests

* undo fix for poetry

* remove unused plugin marker for flakeheaven

* remove unused import in markdown file

* Attempt to exclude .venv from flakeheaven runs in CI

* Exclude more dirs from flakeheaven

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2022-10-29 14:21:11 -07:00 committed by GitHub
parent 847dadac5d
commit a77a3d5a56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 24 deletions

View file

@ -44,11 +44,11 @@ tzlocal = ">=4.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt
[tool.poetry.dev-dependencies]
black = { version = ">=21.5b2", allow-prereleases = true }
flakeheaven = ">=3.0"
ipdb = "*"
isort = ">=5.10"
mkdocs = ">=1.0,<1.3"
poethepoet = "*"
pyproject-flake8 = "*"
pytest = ">=6.2"
pytest-bdd = ">=4.0.1,<6.0"
pytest-clarity = "*"
@ -70,8 +70,9 @@ format-check = [
{cmd = "black --check --diff ."},
]
style-check = [
{cmd = "pflake8 --version"},
{cmd = "pflake8 jrnl tests tasks.py"},
{cmd = "flakeheaven --version"},
{cmd = "flakeheaven plugins"},
{cmd = "flakeheaven lint"},
]
sort-run = [
{cmd = "isort ."},
@ -150,9 +151,25 @@ filterwarnings = [
"ignore:[WinError 5].*"
]
[tool.flake8]
# ignore formatting warnings and errors because we use Black to autoformat
extend-ignore = "E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5"
[tool.flakeheaven]
max_line_length = 88
exclude = [".git", ".tox", ".venv", "node_modules"]
[tool.flakeheaven.plugins]
"py*" = ["+*"]
pycodestyle = [
"-E101",
"-E111", "-E114", "-E115", "-E116", "-E117",
"-E12*",
"-E13*",
"-E2*",
"-E3*",
"-E401",
"-E5*",
"-E70",
"-W1*", "-W2*", "-W3*", "-W5*",
]
[build-system]
requires = ["poetry-core>=1.0.0"]