Skip to content

Commit

Permalink
Move mypy from pre-commit to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Aug 31, 2024
1 parent ef8c7f8 commit 4e19143
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: 1

permissions:
contents: read
Expand All @@ -17,4 +18,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: pip
- uses: pre-commit/action@v3.0.1

- name: Install dependencies
run: |
python3 -m pip install -U tox
- name: Mypy
run: tox -e mypy
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ repos:
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
args: [--strict, --pretty, --show-error-codes]
additional_dependencies:
[platformdirs, pytest, python-slugify, rapidfuzz, types-freezegun, urllib3]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.1
hooks:
Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@ pass_env =
PRE_COMMIT_COLOR
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:mypy]
deps =
mypy==1.11.2
platformdirs
pytest
python-slugify
rapidfuzz
types-freezegun
urllib3
commands =
mypy --strict --pretty --show-error-codes . {posargs}

0 comments on commit 4e19143

Please sign in to comment.