Skip to content

Commit 59eb957

Browse files
authored
Replace flake8 and pycodestyle with ruff (#131)
* Replace flake8 and pycodestyle with ruff * flake8 --> ruff * dev.requirements.txt: ruff==0.0.285, twine==4.0.2 * pip install -t dev.requirements.txt * Ruff
1 parent cab3246 commit 59eb957

File tree

4 files changed

+32
-39
lines changed

4 files changed

+32
-39
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,28 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
17+
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]
1818

1919
steps:
2020
- uses: actions/checkout@v3
2121
- name: setup python
2222
uses: actions/setup-python@v4
2323
with:
2424
python-version: ${{ matrix.python }}
25+
cache: 'pip'
26+
check-latest: true
2527
- name: Install dependencies
2628
run: |
2729
python -m pip install --upgrade pip
2830
pip install -e .
29-
pip install coveralls --upgrade
30-
- name: Run flake8
31-
run: |
32-
pip install flake8 --upgrade
33-
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
34-
- name: Run pycodestyle
35-
run: |
36-
pip install pycodestyle --upgrade
37-
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
31+
pip install -r dev.requirements.txt
32+
pip install --upgrade coveralls
33+
- name: Run ruff
34+
run: ruff --exclude=build --format=github
35+
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
36+
--ignore=F401,F403 --line-length=117 .
3837
- name: Run test
39-
run: |
40-
coverage run --source=slugify test.py
38+
run: coverage run --source=slugify test.py
4139
- name: Coveralls
4240
run: coveralls --service=github
4341
env:

.github/workflows/dev.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,28 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
17+
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]
1818

1919
steps:
2020
- uses: actions/checkout@v3
2121
- name: setup python
2222
uses: actions/setup-python@v4
2323
with:
2424
python-version: ${{ matrix.python }}
25+
cache: 'pip'
26+
check-latest: true
2527
- name: Install dependencies
2628
run: |
2729
python -m pip install --upgrade pip
2830
pip install -e .
29-
pip install coveralls --upgrade
30-
- name: Run flake8
31-
run: |
32-
pip install flake8 --upgrade
33-
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
34-
- name: Run pycodestyle
35-
run: |
36-
pip install pycodestyle --upgrade
37-
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
31+
pip install -r dev.requirements.txt
32+
pip install --upgrade coveralls
33+
- name: Run ruff
34+
run: ruff --exclude=build --format=github
35+
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
36+
--ignore=F401,F403 --line-length=117 .
3837
- name: Run test
39-
run: |
40-
coverage run --source=slugify test.py
38+
run: coverage run --source=slugify test.py
4139
- name: Coveralls
4240
run: coveralls --service=github
4341
env:

.github/workflows/main.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,28 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
16+
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]
1717

1818
steps:
1919
- uses: actions/checkout@v3
2020
- name: setup python
2121
uses: actions/setup-python@v4
2222
with:
2323
python-version: ${{ matrix.python }}
24+
cache: 'pip'
25+
check-latest: true
2426
- name: Install dependencies
2527
run: |
2628
python -m pip install --upgrade pip
2729
pip install -e .
28-
pip install coveralls --upgrade
29-
- name: Run flake8
30-
run: |
31-
pip install flake8 --upgrade
32-
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
33-
- name: Run pycodestyle
34-
run: |
35-
pip install pycodestyle --upgrade
36-
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
30+
pip install -r dev.requirements.txt
31+
pip install --upgrade coveralls
32+
- name: Run ruff
33+
run: ruff --exclude=build --format=github
34+
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
35+
--ignore=F401,F403 --line-length=117 .
3736
- name: Run test
38-
run: |
39-
coverage run --source=slugify test.py
37+
run: coverage run --source=slugify test.py
4038
- name: Coveralls
4139
run: coveralls --service=github
4240
env:

dev.requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
pycodestyle==2.8.0
2-
twine==3.4.1
3-
flake8==4.0.1
1+
ruff==0.0.285
2+
twine==4.0.2

0 commit comments

Comments
 (0)