Skip to content

Commit f0607a1

Browse files
committed
move typecheck to CI, bump pre-commit
1 parent 7c64a9f commit f0607a1

File tree

4 files changed

+154
-20
lines changed

4 files changed

+154
-20
lines changed

.github/workflows/pytest.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,16 @@ jobs:
3232
pip install poetry
3333
poetry install --with dev
3434
35+
# mypy doesn't support Python 3.8, so we run it only for 3.9 and above.
36+
# Still check for typing errors for Python 3.8 when running against one of the newer versions.
37+
# See https://mypy.readthedocs.io/en/stable/changelog.html#drop-support-for-python-3-8.
38+
- name: Check for new typing errors for Python 3.8
39+
if: ${{ matrix.python-version == '3.9' }}
40+
run: poetry run mypy --strict --python-version 3.8 .
41+
42+
- name: Check for new typing errors
43+
if: ${{ matrix.python-version != '3.8' }}
44+
run: poetry run mypy --strict .
45+
3546
- name: Run Tests
3647
run: poetry run pytest

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
repos:
2-
- repo: https://github.com/pre-commit/mirrors-mypy
3-
rev: v1.16.1
4-
hooks:
5-
- id: mypy
6-
args: [--strict]
7-
additional_dependencies:
8-
[pydantic, pytest, pytest_mock, types-requests, flagsmith-flag-engine, responses, sseclient-py]
92
- repo: https://github.com/PyCQA/isort
103
rev: 6.0.1
114
hooks:

0 commit comments

Comments
 (0)