Skip to content

Commit

Permalink
UPD: Migrate flake8 to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKaschta committed Jan 5, 2025
1 parent 4385a6a commit 9fde061
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Install linting package
run: |
python -m pip install --upgrade pip
pip install flake8
pip install ruff
- name: Run linting
run: flake8 --count --show-source --statistics --max-line-length=120
run: ruff check
22 changes: 22 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
default:
image: debian:latest

before_script:
- apt-get -y update
- command -v git || apt-get -y install git
- command -v python3 || apt-get -y install python3
- command -v pip3 || apt-get -y install python3-pip
- python3 -V # Print out python version for debugging
- python3 -m venv || apt-get -y install python3-venv
- python3 -m venv venv && source venv/bin/activate
- command -v venv/bin/ruff || venv/bin/pip3 install ruff

stages:
- lint

ruff:
stage: lint
script:
- ruff check
needs: []
allow_failure: false
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,12 @@ dependencies = [
]

[project.optional-dependencies]
dev = ['flake8']
dev = ['ruff']

[tool.ruff]
# Same as Black.
line-length = 120
indent-width = 4

# Assume Python 3.9
target-version = "py311"

0 comments on commit 9fde061

Please sign in to comment.