Skip to content

Commit 5ae0cd4

Browse files
authored
Merge pull request #844 from bashtage/lm71-rc1-notes
CI: Report mypy errors as a warning only
2 parents 1c3fe26 + 0f00e65 commit 5ae0cd4

2 files changed

Lines changed: 120 additions & 63 deletions

File tree

‎.github/workflows/mypy.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
python -m pip install mypy pandas-stubs scipy-stubs xarray
2828
python -m pip list
2929
# mypy is informational. New releases of mypy and of the stubs of NumPy, pandas
30-
# and SciPy often add errors, so a failure does not fail the check. It adds a
31-
# warning with the number of errors instead, and the log of this step lists them.
30+
# and SciPy often add errors, so a failure does not fail the check. The step
31+
# records the failure instead of failing, so that the only annotation is a
32+
# warning with the number of errors. The log of this step lists them.
3233
- name: Run mypy
3334
id: mypy
34-
continue-on-error: true
35-
run: python -m mypy linearmodels | tee mypy.txt
35+
run: python -m mypy linearmodels | tee mypy.txt || echo "failed=true" >> "$GITHUB_OUTPUT"
3636
- name: Report the result of mypy
37-
if: steps.mypy.outcome == 'failure'
37+
if: steps.mypy.outputs.failed == 'true'
3838
run: echo "::warning title=mypy::$(tail -n 1 mypy.txt). This check is informational."

0 commit comments

Comments
 (0)