From f6760df9447c54292647b93260d95ec75ec2cc37 Mon Sep 17 00:00:00 2001 From: Mirko Bronzi Date: Thu, 3 Oct 2024 16:57:44 -0400 Subject: [PATCH 1/2] flake8 now does not run in .venv --- .flake8 | 3 ++- hooks/pre-commit | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 469e681..56124f5 100644 --- a/.flake8 +++ b/.flake8 @@ -1,4 +1,5 @@ [flake8] max-line-length=100 ignore=W503,D104,D100,D401 -docstring-convention=google \ No newline at end of file +docstring-convention=google +exclude= .venv diff --git a/hooks/pre-commit b/hooks/pre-commit index 96715b2..2cac5c6 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -5,7 +5,8 @@ set -e # linting flake8 --ignore D . # Check everything but docstrings -flake8 --select D --exclude tests/ # Check only the docstrings +flake8 --select D . --exclude tests/,.venv # Check only the docstrings +exit isort --check . # Check imports # Raise error if any staged notebooks contain outputs From 518ffda2c05ba30f9b8ce5cbd72c17893d6b87b0 Mon Sep 17 00:00:00 2001 From: Mirko Bronzi Date: Thu, 3 Oct 2024 16:58:47 -0400 Subject: [PATCH 2/2] removed leftover exit command --- hooks/pre-commit | 1 - 1 file changed, 1 deletion(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 2cac5c6..b930ae1 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -6,7 +6,6 @@ set -e # linting flake8 --ignore D . # Check everything but docstrings flake8 --select D . --exclude tests/,.venv # Check only the docstrings -exit isort --check . # Check imports # Raise error if any staged notebooks contain outputs