Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jashparekh/mypy-action
GitHub Action for running mypy
https://github.com/jashparekh/mypy-action
actions github github-actions linting mypy mypy-plugins python
Last synced: about 9 hours ago
JSON representation
GitHub Action for running mypy
- Host: GitHub
- URL: https://github.com/jashparekh/mypy-action
- Owner: jashparekh
- License: mit
- Created: 2021-12-04T19:57:25.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-07T05:02:42.000Z (over 1 year ago)
- Last Synced: 2024-10-18T04:04:42.395Z (21 days ago)
- Topics: actions, github, github-actions, linting, mypy, mypy-plugins, python
- Language: Shell
- Homepage: https://github.com/marketplace/actions/mypy-github-action
- Size: 58.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Mypy Github Action
GitHub Action for [mypy](https://mypy.readthedocs.io/en/master/).
Influenced by [jpetrucciani/mypy-check](https://github.com/jpetrucciani/mypy-check).
### Simple
```yaml
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`