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

GitHub Action

Mypy Github Action

v1

Mypy Github Action

activity

Mypy Github Action

GitHub Action to run mypy linting

Installation

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

              

- name: Mypy Github Action

uses: jashparekh/mypy-action@v1

Learn more about this action in jashparekh/mypy-action

Choose a version

Mypy Github Action

GitHub Action for mypy.

Influenced by jpetrucciani/mypy-check.

Simple

name: "Mypy"
on:
  pull_request: {}
  push:
      branches: ["main"]

jobs:
  run_mypy:
    runs-on: ubuntu-latest
    name: Mypy
    steps:
      # To use this repository's private action,
      # you must check out the repository
      - name: Checkout
        uses: actions/checkout@v2
      - name: Run Mypy
        uses: jashparekh/mypy-action@v1
        with:
          path: '.'
          mypy_version: '0.910'
          mypy_flags: '--verbose'

Configuration

path (optional, string)

File or directory to run mypy on.

Default: .

mypy_version (optional, string)

Version of mypy library to use for linting.

Default: 0.910

mypy_config_file (optional, string)

Location of mypy config file in the repository.

Default: mypy.ini

mypy_flags (optional, string)

Optional mypy flags (refer to mypy --help)

Default: mypy.ini