use ruff for linting and enforce linting via ci

This commit is contained in:
Arthur Deierlein
2024-12-17 22:53:05 +01:00
parent ac842bbe74
commit 8e9b719a16
2 changed files with 33 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
---
name: Ruff
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v1
with:
args: check
src: "."
+18
View File
@@ -71,6 +71,24 @@ show_traceback = true
[tool.mypy.overrides]
ignore_missing_imports = true
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"G", # flake8-logging-format
"PIE", # flake8-pie
"UP", # pyupgrade
]
ignore = [
"E501", # ignore due to conflict with formatter
]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"