Skip to content

Fix black and isort linters #2

Fix black and isort linters

Fix black and isort linters #2

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint
name: pre-deploy (linters and tests)
on:
# run only when finance/ folder is changed
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- 'finance/**'
jobs:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
# if score is less than 1, the build will fail
run: |
pylint $(git ls-files '*.py') --fail-under=1
format:
name: check code style with black
uses: ahnazary/actions-library/.github/workflows/black.yaml@main
flake8:
name: check code style with flake8
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: run flake8
run: |
pip install flake8
flake8 --max-line-length=99 --extend-ignore=E402