Enable FURB in ruff

This commit is contained in:
Alexander Hess 2026-11-30 21:33:43 +01:00
commit 00aff456c3
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
2 changed files with 5 additions and 1 deletions

View file

@ -243,6 +243,8 @@ select = [
# ========================================
# `ruff` only (no working `flake8` plugin)
# ========================================
# refurb => Modern idioms
# "FURB",
# Perflint => No performance anti-patterns
# "PERF",
# flake8-use-pathlib => `pathlib` instead of `os` functions
@ -511,6 +513,8 @@ select = [
# =======================================
# eradicate => no commented-out code
"ERA",
# refurb => Modern idioms
"FURB",
# isort => imports are sorted
"I",
# flake8-import-conventions => Unified import aliases

View file

@ -77,7 +77,7 @@ def get_years_since_release(
latest_version = data["info"]["version"]
release_date = infos_for_pinned_release[0]["upload_time"]
release_date = dt.datetime.fromisoformat(release_date.replace("Z", "+00:00"))
release_date = dt.datetime.fromisoformat(release_date)
years_since_release = (dt.datetime.now() - release_date).days / 365.25