]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
build: add section to configure ruff
authorJoerg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 19 Sep 2023 08:39:29 +0000 (10:39 +0200)
committerJoerg Behrmann <behrmann@physik.fu-berlin.de>
Tue, 19 Sep 2023 10:05:29 +0000 (12:05 +0200)
ruff [1] is a new very fast linter that combines rules from many commonly used
linters like pyflakes, isort or pyupgrade.

This commit uses the rules from pycodestyle (enabeled by default), pyflakes,
isort and pyupgrade and reintroduces the 119 character line length limit that
was used in the past with black and flake8, but was lost when black was disabled.

[1] https://github.com/astral-sh/ruff

pyproject.toml

index 5fd5f9b02a5abad0a3eb7764f44b4fdae8b8948a..af085d2f03c1d12e3158dd318fbe9ed5fe48d548 100644 (file)
@@ -68,3 +68,8 @@ strict_equality = true
 [[tool.mypy.overrides]]
 module = ["argcomplete"]
 ignore_missing_imports = true
+
+[tool.ruff]
+target-version = "py39"
+line-length = 119
+select = ["E", "F", "I", "UP"]