Skip to content

Commit

Permalink
Replace flake8 and pycodestyle with ruff (#131)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cclauss committed Oct 9, 2023
1 parent cab3246 commit 59eb957
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 39 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]

steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install coveralls --upgrade
- name: Run flake8
run: |
pip install flake8 --upgrade
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
- name: Run pycodestyle
run: |
pip install pycodestyle --upgrade
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
pip install -r dev.requirements.txt
pip install --upgrade coveralls
- name: Run ruff
run: ruff --exclude=build --format=github
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
--ignore=F401,F403 --line-length=117 .
- name: Run test
run: |
coverage run --source=slugify test.py
run: coverage run --source=slugify test.py
- name: Coveralls
run: coveralls --service=github
env:
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]

steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install coveralls --upgrade
- name: Run flake8
run: |
pip install flake8 --upgrade
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
- name: Run pycodestyle
run: |
pip install pycodestyle --upgrade
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
pip install -r dev.requirements.txt
pip install --upgrade coveralls
- name: Run ruff
run: ruff --exclude=build --format=github
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
--ignore=F401,F403 --line-length=117 .
- name: Run test
run: |
coverage run --source=slugify test.py
run: coverage run --source=slugify test.py
- name: Coveralls
run: coveralls --service=github
env:
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.8]
python: [3.7, 3.8, 3.9, "3.10", 3.11, pypy3.9]

steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
check-latest: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install coveralls --upgrade
- name: Run flake8
run: |
pip install flake8 --upgrade
flake8 --exclude=build --ignore=E501,F403,F401,E241,E225,E128 .
- name: Run pycodestyle
run: |
pip install pycodestyle --upgrade
pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
pip install -r dev.requirements.txt
pip install --upgrade coveralls
- name: Run ruff
run: ruff --exclude=build --format=github
--select="A,B,DJ,E,F,PLC,PLE,PLW,W"
--ignore=F401,F403 --line-length=117 .
- name: Run test
run: |
coverage run --source=slugify test.py
run: coverage run --source=slugify test.py
- name: Coveralls
run: coveralls --service=github
env:
Expand Down
5 changes: 2 additions & 3 deletions dev.requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pycodestyle==2.8.0
twine==3.4.1
flake8==4.0.1
ruff==0.0.285
twine==4.0.2

0 comments on commit 59eb957

Please sign in to comment.