Skip to content

Commit 9fde061

Browse files
UPD: Migrate flake8 to ruff
1 parent 4385a6a commit 9fde061

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Install linting package
1717
run: |
1818
python -m pip install --upgrade pip
19-
pip install flake8
19+
pip install ruff
2020
- name: Run linting
21-
run: flake8 --count --show-source --statistics --max-line-length=120
21+
run: ruff check

.gitlab-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
default:
2+
image: debian:latest
3+
4+
before_script:
5+
- apt-get -y update
6+
- command -v git || apt-get -y install git
7+
- command -v python3 || apt-get -y install python3
8+
- command -v pip3 || apt-get -y install python3-pip
9+
- python3 -V # Print out python version for debugging
10+
- python3 -m venv || apt-get -y install python3-venv
11+
- python3 -m venv venv && source venv/bin/activate
12+
- command -v venv/bin/ruff || venv/bin/pip3 install ruff
13+
14+
stages:
15+
- lint
16+
17+
ruff:
18+
stage: lint
19+
script:
20+
- ruff check
21+
needs: []
22+
allow_failure: false

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ dependencies = [
2222
]
2323

2424
[project.optional-dependencies]
25-
dev = ['flake8']
25+
dev = ['ruff']
26+
27+
[tool.ruff]
28+
# Same as Black.
29+
line-length = 120
30+
indent-width = 4
31+
32+
# Assume Python 3.9
33+
target-version = "py311"

0 commit comments

Comments
 (0)