Skip to content

Commit 4dc34dc

Browse files
committed
revert: replace flake8 with Ruff linter and formatter
1 parent bc0f1e5 commit 4dc34dc

1 file changed

Lines changed: 30 additions & 25 deletions

File tree

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
34
name: Python package
5+
46
on:
57
push:
68
branches: [ "dev", "main" ]
79
pull_request:
810
branches: [ "dev", "main" ]
11+
912
jobs:
1013
build:
14+
1115
runs-on: ubuntu-latest
1216
strategy:
1317
fail-fast: false
1418
matrix:
1519
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
1621
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
python -m pip install ruff setuptools wheel
26-
pip install -e ".[dev]" --no-build-isolation
27-
- name: Lint with Ruff
28-
run: |
29-
ruff check .
30-
- name: Format check with Ruff
31-
run: |
32-
ruff format --check .
33-
- name: Test with pytest
34-
run: |
35-
pytest --cov=krakenparser --cov-report=xml
36-
- name: Upload coverage to Codecov
37-
if: matrix.python-version == '3.12'
38-
uses: codecov/codecov-action@v5
39-
with:
40-
files: coverage.xml
41-
token: ${{ secrets.CODECOV_TOKEN }}
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install flake8 setuptools wheel
31+
pip install -e ".[dev]" --no-build-isolation
32+
- name: Lint with flake8
33+
run: |
34+
# stop the build if there are Python syntax errors or undefined names
35+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
- name: Test with pytest
39+
run: |
40+
pytest --cov=krakenparser --cov-report=xml
41+
- name: Upload coverage to Codecov
42+
if: matrix.python-version == '3.12'
43+
uses: codecov/codecov-action@v5
44+
with:
45+
files: coverage.xml
46+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)