From 370810d6dddc4961f2e9005e5caee3fc4b6a384a Mon Sep 17 00:00:00 2001 From: Joao Mario Lago Date: Fri, 3 May 2024 10:46:12 -0300 Subject: [PATCH] pre-push: Add dedicated ignored folder for mypy * Add a dedicated __mypycache__ folder for mypy cache dir to avoid the 3.11 folders being created that can be tracked by git --- .gitignore | 1 + .hooks/pre-push | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index da74434ba..0739a43b8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ node_modules # Avoid local python development *__pycache__ *.pytest_cache +*__mypycache__ env/ Pipfile Pipfile.lock diff --git a/.hooks/pre-push b/.hooks/pre-push index 1746632ee..ada2e80b2 100755 --- a/.hooks/pre-push +++ b/.hooks/pre-push @@ -95,7 +95,7 @@ echo "Running pylint.." pipenv run pylint $python_files echo "Running mypy.." -git ls-files '*setup.py' | parallel 'pipenv run mypy $(dirname {}) --cache-dir $(dirname {})' +git ls-files '*setup.py' | parallel 'pipenv run mypy $(dirname {}) --cache-dir "$(dirname {})/__mypycache__"' echo "Running pytest.." pipenv run pytest -n 10 --cov="$repository_path" --cov-report html