From c5592027b49ba78836304d940cc5392942b93b69 Mon Sep 17 00:00:00 2001 From: John Strunk Date: Mon, 23 Dec 2024 15:00:42 -0500 Subject: [PATCH] Upgrade ruff Signed-off-by: John Strunk --- .pre-commit-config.yaml | 4 ++-- raceinfo/heatdata.py | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f990160..4442f428 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: args: ["--strict", "-c", ".github/yamllint-config.yml"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.4" + rev: "v0.8.4" hooks: # Note: lint/fix before format - id: ruff # Run the linter. @@ -62,7 +62,7 @@ repos: - id: markdownlint - repo: https://github.com/renovatebot/pre-commit-hooks - rev: "39.82.1" + rev: "39.82.3" hooks: - id: renovate-config-validator language_version: lts # Use the LTS version of Node.js diff --git a/raceinfo/heatdata.py b/raceinfo/heatdata.py index 9bb628f3..1b69bf8a 100644 --- a/raceinfo/heatdata.py +++ b/raceinfo/heatdata.py @@ -86,11 +86,8 @@ def __post_init__(self): if self.age < 0: raise ValueError("Age must be non-negative") if ( - not isinstance(self.seed_time, NumericTime) - and self.seed_time != NT - or isinstance(self.seed_time, NumericTime) - and self.seed_time < 0 - ): + not isinstance(self.seed_time, NumericTime) and self.seed_time != NT + ) or (isinstance(self.seed_time, NumericTime) and self.seed_time < 0): raise ValueError("Seed time must be non-negative or NT") # Mark the lane as empty if there are no times or all times are zero # and there's no name or team