show `mypy` errors inline on PRs (#2075)

show mypy errors inline on PRs

---------

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com>
Co-authored-by: Gulshan Singh <gsingh2011@gmail.com>
This commit is contained in:
Divyansh Singh 2024-03-21 23:02:18 +05:30 committed by GitHub
parent c0d785565b
commit a75b150242
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 1 deletions

View File

@ -32,3 +32,21 @@ jobs:
run: | run: |
git diff-index --quiet HEAD -- pwndbg tests git diff-index --quiet HEAD -- pwndbg tests
./lint.sh ./lint.sh
- name: Run mypy
uses: tsuyoshicho/action-mypy@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-check
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: error
# Change the current directory to run mypy command.
# mypy command reads setup.cfg or other settings file in this path.
execute_command: poetry run mypy
install_types: false
target: pwndbg
filter_mode: nofilter
fail_on_error: true

View File

@ -80,4 +80,7 @@ fi
# Checking minimum python version # Checking minimum python version
vermin -vvv --no-tips -t=3.8- --violations ./pwndbg/ vermin -vvv --no-tips -t=3.8- --violations ./pwndbg/
mypy pwndbg # mypy is run in a separate step on GitHub Actions
if [[ -z "$GITHUB_ACTIONS" ]]; then
mypy pwndbg
fi