Skip to content
Snippets Groups Projects
Commit 27836479 authored by Moul's avatar Moul
Browse files

Introduce Ruff (#458)

pre-commit and gitlab-ci configurations
Add ruff configuration
parent bc6f7f46
Branches
Tags
No related merge requests found
......@@ -80,6 +80,14 @@ pre-commit:hooks:
- pre-commit run -a insert-license
- pre-commit run -a mdformat
ruff:
extends:
- .code_changes
- .pre-commit
stage: checks
script:
- pre-commit run -a ruff
.tests:
extends: .changes
stage: tests
......
......@@ -10,6 +10,11 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
......
......@@ -43,3 +43,10 @@ classifiers = [
[tool.mypy]
ignore_missing_imports = true
[tool.ruff]
line-length = 101
target-version = "py37"
select = ["W", "I", "UP", "YTT", "B", "A", "DTZ", "T10",
"EXE", "ISC", "ICN", "G", "INP", "PIE", "PYI", "Q", "RSE", "SLF", "TID",
"COM", "C4", "PT", "RET", "SIM", "PTH", "PGH", "PL", "TRY", "RUF"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment