Skip to content

Commit

Permalink
test: replace pytest-flake8 with pre-commit
Browse files Browse the repository at this point in the history
There's weird behaviors with Flake8 interacting with pytest.

Instead of using pytest to run the tests, make it a pre-commit hook.

Resolves #82

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
miketheman committed Dec 21, 2021
1 parent ef2cfcf commit 03fff01
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: '2.4.0'
hooks:
- id: editorconfig-checker
alias: ec
- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
hooks:
- id: flake8
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ pytest = ">=3.6.3"
pytest = "^6.0"
pytest-cov = "^2.8.1"
pytest-httpbin = "^1.0"
pytest-flake8 = "^1.0.4"
asynctest = "^0.13.0"
requests = "^2.26.0"
starlette = "^0.14.2"
Expand Down
1 change: 0 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
addopts =
--cov
--cov-report=term
--flake8

0 comments on commit 03fff01

Please sign in to comment.