Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
alert-octagon

GitHub Action

Run pyright with reviewdog

v1.0.2

Run pyright with reviewdog

alert-octagon

Run pyright with reviewdog

🐶 Run pyright on pull requests and get reviews with reviewdog

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run pyright with reviewdog

uses: jordemort/[email protected]

Learn more about this action in jordemort/action-pyright

Choose a version

action-pyright

depup release GitHub release (latest SemVer) action-bumpr supported

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.

screenshot

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.

Example usage

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

Inputs

github_token

Required. Default is ${{ github.token }}.

level

Optional. Report level for reviewdog [info,warning,error]. It's same as -level flag of reviewdog.

reporter

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.

github-pr-review can use Markdown and add a link to rule page in reviewdog reports.

filter_mode

Optional. Filtering mode for the reviewdog command [added,diff_context,file,nofilter]. Default is added.

fail_on_error

Optional. Exit code for reviewdog when errors are found [true,false] Default is false.

reviewdog_flags

Optional. Additional reviewdog flags

workdir

Optional. The directory from which to look for and run eslint. Default '.'

pyright_version

Optional. Version of pyright to run. If not specified, the latest version will be used.

python_platform

Optional. Analyze for a specific platform (Darwin, Linux, Windows)

python_version

Optional. Analyze for a specific Python version (3.3, 3.4, etc.)

typeshed_path

Optional. Use typeshed type stubs at this location.

venv_path

Optional. Directory that contains virtual environments.

project

Optional. Use the configuration file at this location.

lib

Optional. Use library code to infer types when stubs are missing. Default false.

pyright_flags

Optional extra arguments; can be used to specify specific files to check.