Enable more lint rules #10

Merged
alexander merged 31 commits from more-lint-rules into develop 2026-11-30 23:59:09 +01:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 9cc21f5b69 - Show all commits

Enable PTH in ruff

Alexander Hess 2026-11-30 21:11:14 +01:00
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -135,7 +135,7 @@ os.environ.setdefault("UV_PYTHON_PREFERENCE", "only-managed")
# Where to keep temporary files (e.g., the constraints file in `install_pinned()`)
tempfile.tempdir = ".cache/tmp"
os.makedirs(tempfile.tempdir, exist_ok=True)
pathlib.Path(tempfile.tempdir).mkdir(parents=True, exist_ok=True)
@nox.session(name="format", python=MAIN_PYTHON)
@ -318,7 +318,7 @@ def build_docs(session: nox.Session) -> None:
# Verify that all external links return 200 OK
session.run("sphinx-build", "-b", "linkcheck", DOCS_LOCATION, DOCS_BUILD)
session.log(f"Docs are available at {os.getcwd()}/{DOCS_BUILD}index.html")
session.log(f"Docs are available at {pathlib.Path.cwd()}/{DOCS_BUILD}index.html")
@nox.session(name="venv", python=MAIN_PYTHON, venv_backend="none")

View file

@ -243,6 +243,8 @@ select = [
# ========================================
# `ruff` only (no working `flake8` plugin)
# ========================================
# flake8-use-pathlib => `pathlib` instead of `os` functions
# "PTH",
# pyupgrade => Modern syntax for the targeted Python version
# "UP",
]
@ -513,6 +515,8 @@ select = [
"ICN",
# Pylint's refactoring rules => simpler and smaller functions
"PLR",
# flake8-use-pathlib => `pathlib` instead of `os` functions
"PTH",
# flake8-print => no `print()`
"T20",
# pyupgrade => Modern syntax for the targeted Python version