Skip to content

Commit

Permalink
add flake8 linting
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixthrush authored Apr 19, 2024
1 parent f1e049e commit fe8d966
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 24 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/pylint.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/python-linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Python Application CI

on:
push:
branches: [ "python-rewrite" ]
pull_request:
branches: [ "python-rewrite" ]

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

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 flake8 pylint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Analyzing the code with pylint
run: |
pylint $(git ls-files '*.py')

0 comments on commit fe8d966

Please sign in to comment.