Issue 4993 Add standard pre commit hooks and apply linting. (#4994)

* Add .pre-commit-config.yaml to the project and exclude tests (for now).  This does not include the MyPy linting that pip does but does include everything else.
This commit is contained in:
Matt Davis
2022-03-29 23:01:50 -04:00
committed by GitHub
parent 3387881a6d
commit 9a3b3ce706
48 changed files with 2330 additions and 1350 deletions
+8 -1
View File
@@ -72,6 +72,14 @@ jobs:
git submodule update --init --recursive
python -m pip install -e . --upgrade
pipenv install --deploy --dev --python=${{ steps.python-path.outputs.path }}
- name: Lint check of the code
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
PYTHONWARNINGS: ignore:DEPRECATION
PYTHONIOENCODING: "utf-8"
GIT_ASK_YESNO: "false"
run: |
pipenv run pre-commit run --all-files --verbose
- name: Run tests
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ matrix.python-version }}
@@ -109,4 +117,3 @@ jobs:
- run: |
python -m pip install --upgrade wheel invoke parver bs4 vistir towncrier
python -m invoke vendoring.update