Skip to content

Commit

Permalink
pre-push: Add dedicated ignored folder for mypy
Browse files Browse the repository at this point in the history
* Add a dedicated __mypycache__ folder for mypy cache dir to avoid the
  3.11 folders being created that can be tracked by git
  • Loading branch information
JoaoMario109 authored and patrickelectric committed May 3, 2024
1 parent 28e7993 commit 370810d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@ node_modules
# Avoid local python development
*__pycache__
*.pytest_cache
*__mypycache__
env/
Pipfile
Pipfile.lock
Expand Down
2 changes: 1 addition & 1 deletion .hooks/pre-push
Expand Up @@ -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
Expand Down

0 comments on commit 370810d

Please sign in to comment.