Skip to content

Mypy Github Action

Actions
GitHub Action to run mypy linting
v3
Latest
Star (2)

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@v2
        with:
          path: '.'
          mypy_version: '0.910'
          mypy_flags: '--verbose'
          mypy_config_file: 'mypy.ini'
          requirement_files: 'requirements.txt'

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: latest

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

requirements (optional, string)

Optional, if not empty specified libraries will be installed before running mypy

Default: ""

requirement_files (optional, string)

Optional, if not empty specified install all the libraries specified in the files before running mypy

Default: ""

python_version (optional, string)

Python version to use to run lint

Default: 3.10

Mypy Github Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub Action to run mypy linting
v3
Latest

Mypy Github Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.