Skip to content

Commit

Permalink
Switch to flake8 for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinLucas committed Nov 11, 2024
1 parent dedd4ba commit 3e3ddc4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 642 deletions.
52 changes: 17 additions & 35 deletions .github/workflows/premerge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,26 @@ on: [push, workflow_dispatch]

# Jobs
jobs:
pylint-run:
# Runs pylint check of code

runs-on: [ubuntu-latest]
environment: 'CI'

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set python version
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pylint
run: |
pylint ${PWD}
black-run:
# Runs black --check --verbose on the code
flake8-run:
# Runs flake8 as an alternative, faster(?) linter

runs-on: [ubuntu-latest]
environment: 'CI'

name: Run flake8
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Run black check
uses: psf/black@stable
with:
options: "--check --verbose"
src: "."
version: "~= 24.10.0"
- name: Check out source repository
uses: actions/checkout@v4

- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Run flake8
uses: py-actions/flake8@v2
with:
max-line-length: "120"
exclude: .git,__pycache__,venv
plugins: "flake8-bugbear flake8-black"
Loading

0 comments on commit 3e3ddc4

Please sign in to comment.