Python syntax improvement #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code style | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'src/**' | |
jobs: | |
code-style: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- tool: black | |
arguments: --check src/ | |
working_directory: . | |
- tool: mypy | |
# TODO: Remove temporal ignores when click custom Groups are available: https://click.palletsprojects.com/en/latest/commands/#custom-groups | |
arguments: --namespace-packages --package rekono --install-types --non-interactive --ignore-missing-imports --exclude rekono/main.py --disable-error-code type-var | |
working_directory: ./src | |
- tool: flake8 | |
arguments: --ignore=E203,E501,W503,W605 src/ | |
working_directory: . | |
name: ${{ matrix.tool }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip | |
python -m pip install -r src/requirements-dev.txt | |
- name: Check | |
working-directory: ${{ matrix.working_directory }} | |
run: ${{ matrix.tool }} ${{ matrix.arguments }} |