Skip to content

Commit 6fda5d3

Browse files
authored
Merge pull request #178 from pytest-dev/176-use-pre-commit-to-run-mypy
Use pre commit to run mypy #176
2 parents edd1866 + cd321c8 commit 6fda5d3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ repos:
3434
rev: v2.2.1
3535
hooks:
3636
- id: autoflake
37+
- repo: https://github.com/pre-commit/mirrors-mypy
38+
rev: v1.6.1
39+
hooks:
40+
- id: mypy
41+
files: ^(src/|tests/)

src/pytest_flask/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_login(self):
4545
request.cls.client = client
4646

4747

48-
@pytest.fixture(scope=_determine_scope) # type: ignore[arg-type]
48+
@pytest.fixture(scope=_determine_scope)
4949
def live_server(
5050
request: _PytestFixtureRequest, app: _FlaskApp, pytestconfig: _PytestConfig
5151
) -> Generator[LiveServer, Any, Any]: # pragma: no cover

tox.ini

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{38,39,310,311,312,linting},mypy
3+
py{38,39,310,311,312,linting}
44

55
[pytest]
66
norecursedirs = .git .tox env coverage docs
@@ -57,11 +57,6 @@ basepython = python3.8
5757
deps = pre-commit>=1.11.0
5858
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
5959

60-
[testenv:mypy]
61-
basepython = python3.8
62-
deps = mypy>=1.6.1
63-
commands = mypy src
64-
6560
[testenv:docs]
6661
changedir = docs
6762
skipsdist = True

0 commit comments

Comments
 (0)