Skip to content

Commit c45c25d

Browse files
authored
👷 Run mypy by pre-commit (#287)
1 parent 6ff0e81 commit c45c25d

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
pyproject.toml
4949
uv.lock
5050
- name: Install Dependencies
51-
run: uv sync --locked
51+
run: uv sync --locked --extra standard
5252
- name: Run prek - pre-commit
5353
id: precommit
5454
run: uvx prek run --from-ref origin/${GITHUB_BASE_REF} --to-ref HEAD --show-diff-on-failure

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ repos:
2626
require_serial: true
2727
language: unsupported
2828
types: [python]
29+
30+
- id: local-mypy
31+
name: mypy check
32+
entry: uv run mypy src tests
33+
require_serial: true
34+
language: unsupported
35+
pass_filenames: false

tests/test_utils_cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
from logging.config import dictConfig
23

34
from pytest import LogCaptureFixture
45

@@ -63,7 +64,7 @@ def test_log_config_does_not_disable_existing_loggers(
6364
logger1.setLevel(logging.INFO)
6465
logger1.info("Message before configuration")
6566

66-
logging.config.dictConfig(get_uvicorn_log_config())
67+
dictConfig(get_uvicorn_log_config())
6768

6869
logger2 = logging.getLogger(__name__)
6970

0 commit comments

Comments
 (0)