Skip to content

Commit

Permalink
Move mypy to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Oct 15, 2024
1 parent 4887da3 commit 1d126fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ jobs:
python-version: "3.x"
cache: pip
- uses: pre-commit/action@v3.0.1

mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install uv
uses: hynek/setup-cached-uv@v2
- name: Mypy
run: uvx --with tox-uv 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 @@ -34,14 +34,6 @@ repos:
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [types-colorama]
args: [--pretty, --show-error-codes]
exclude: ^tests/

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.4
hooks:
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ requires =
tox>=4.2
env_list =
lint
mypy
py{py3, 313, 312, 311, 310, 39}

[testenv]
Expand All @@ -27,3 +28,10 @@ pass_env =
PRE_COMMIT_COLOR
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:mypy]
deps =
mypy==1.11.2
types-colorama
commands =
mypy . {posargs} --exclude tests

0 comments on commit 1d126fe

Please sign in to comment.