This is an action that runs the pyright type checker against your Python code, and uses reviewdog to create GitHub PR comments or reviews with the results.
This action is based on action-eslint and inspired by pyright-action.
You can configure pyright using pyrightconfig.json
or pyproject.toml
, or see the inputs below.
name: reviewdog
on: [pull_request]
jobs:
pyright:
name: pyright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jordemort/action-pyright@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # You need this
reporter: github-pr-review # Change reporter.
lib: true
Required. Default is ${{ github.token }}
.
Optional. Report level for reviewdog [info,warning,error].
It's same as -level
flag of reviewdog.
Reporter of reviewdog command [github-pr-check,github-check,github-pr-review].
Default is github-pr-review.
It's same as -reporter
flag of reviewdog.
Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.
Optional. Exit code for reviewdog when errors are found [true,false]
Default is false
.
Optional. Additional reviewdog flags
Optional. The directory from which to run pyright. Default '.'
Optional. Version of pyright to run. If not specified, the latest version will be used.
Optional. Analyze for a specific platform (Darwin, Linux, Windows)
Optional. Analyze for a specific Python version (3.3, 3.4, etc.)
Optional. Use typeshed type stubs at this location.
Optional. Directory that contains virtual environments.
Optional. Use the configuration file at this location.
Optional. Use library code to infer types when stubs are missing. Default false
.
Optional extra arguments; can be used to specify specific files to check.