ci: Improve mypy output
- Set MYPY_FORCE_TERMINAL_WIDTH to get 180-column output (rather than 80), so that error messages fit on one line. - Set MYPY_FORCE_COLOR to get colored output - Adjust problemmatcher regex accordingly
This commit is contained in:
parent
033baad2f2
commit
f82c8cb5fe
|
|
@ -2,6 +2,8 @@ name: CI
|
|||
on: [push, pull_request]
|
||||
env:
|
||||
PY_COLORS: "1"
|
||||
MYPY_FORCE_TERMINAL_WIDTH: "180"
|
||||
MYPY_FORCE_COLOR: "1"
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ MATCHERS = {
|
|||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": r"^([^:]+):(\d+): ([^:]+): (.*) \[(.*)\]$",
|
||||
"regexp": r"^([^:]+):(\d+): \033\[1m\033\[31m([^:]+):\033\[m (.*) \033\[m\033\[33m\[(.*)\]\033\[m$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"severity": 3,
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -197,7 +197,7 @@ commands = bash scripts/dev/run_shellcheck.sh {posargs}
|
|||
[testenv:mypy]
|
||||
basepython = {env:PYTHON:python3}
|
||||
pip_version = pip
|
||||
passenv = TERM
|
||||
passenv = TERM MYPY_FORCE_TERMINAL_WIDTH MYPY_FORCE_COLOR
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/misc/requirements/requirements-dev.txt
|
||||
|
|
|
|||
Loading…
Reference in New Issue