python_lint
A `file.py:12: error` diagnostic from mypy, ruff, flake8 or pylint.
pythonlinttoolmatcher
Install: ci-doctor matchers add official/python_lint
matchers/python/python_lint/matcher.yaml
id: python_lintrole: toolclassification: [python, lint]description: 'A `file.py:12: error` diagnostic from mypy, ruff, flake8 or pylint.'pattern: ^\S+\.py:\d+:(\d+:)? (error|[EFWCN]\d+)after: 3
In bundles
Fixtures
Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.
mypy_type_errorOpen in playground
1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: mypy_type_error
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run pip install -e ".[dev]" --quiet
35pip install -e ".[dev]" --quiet
36ruff check etl
37mypy --strict etl
38shell: /usr/bin/bash -e {0}
39##[endgroup]
40Successfully installed etl-2.1.0 mypy-1.10.0
41All checks passed!
42etl/transform.py:88: error: Unsupported operand types for / ("Decimal" and "None") [operator]
43etl/transform.py:88: note: Right operand is of type "float | None"
44etl/load.py:23: error: Function is missing a return type annotation [no-untyped-def]
45etl/load.py:23: note: Use "-> None" if function does not return a value
46Found 2 errors in 2 files (checked 14 source files)
47##[error]Process completed with exit code 1.
48##[group]Post Run actions/checkout@v4
49##[endgroup]
50/usr/bin/git version
51git version 2.54.0
52##[group]Post Run actions/upload-artifact@v4
53##[endgroup]
54Artifact upload complete.
55##[warning].mypy_cache/: no matching files. Ensure that the artifact path is relative to the working directory
56Post job cleanup.
57Cleaning up orphan processes
1Running with gitlab-runner 16.9.1 (d773c4a1)
2 on py-runner-05 Py8Lc4Rd, system ID: s_33aa44bb55cc
3Preparing the "docker" executor
4 Using Docker executor with image python:3.12-slim ...
5Using Docker executor with image python:3.12-slim ...
6Using docker image sha256:2b1a0f9e8d7c for python:3.12-slim with digest python@sha256:3c4d...
7Preparing environment
8Running on runner-py8lc4rd-project-37-concurrent-1...
9Fetching changes with git depth set to 50...
10Checking out 7bb0e219 as detached HEAD...
11Checking cache for pip-3.12-default...
12Successfully extracted cache
13$ pip install -e ".[dev]" --quiet
14Successfully installed etl-2.1.0 mypy-1.10.0
15$ ruff check etl
16All checks passed!
17$ mypy --strict etl
18etl/transform.py:88: error: Unsupported operand types for / ("Decimal" and "None") [operator]
19etl/transform.py:88: note: Right operand is of type "float | None"
20etl/load.py:23: error: Function is missing a return type annotation [no-untyped-def]
21etl/load.py:23: note: Use "-> None" if function does not return a value
22Found 2 errors in 2 files (checked 14 source files)
23Running after_script
24$ echo "type check failed"
25type check failed
26Uploading artifacts for failed job
27WARNING: .mypy_cache/: no matching files. Ensure that the artifact path is relative to the working directory
28ERROR: Job failed: exit code 1