From dd6664c27820cdfb56e0482b4bae2e13fdecba96 Mon Sep 17 00:00:00 2001 From: massquantity Date: Fri, 4 Jul 2025 19:33:42 +0800 Subject: [PATCH] [Lint] Fix ruff rules --- libreco/sampling/random_walks.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libreco/sampling/random_walks.py b/libreco/sampling/random_walks.py index 08256d96..2328c1e1 100644 --- a/libreco/sampling/random_walks.py +++ b/libreco/sampling/random_walks.py @@ -156,4 +156,4 @@ def remove_target_node(neighbors, node): def compute_offsets(neighbor_lens): cumsum = list(itertools.accumulate(neighbor_lens, operator.add)) - return [0] + cumsum[:-1] + return [0, *cumsum[:-1]] diff --git a/pyproject.toml b/pyproject.toml index b5b0409f..081e07cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,7 @@ filterwarnings = [ line-length = 88 target-version = "py38" output-format = "full" -lint.ignore = ["E501", "RUF022", "RUF023"] +lint.ignore = ["E501", "RUF022", "RUF023", "RUF028"] lint.select = [ # flake8-async "ASYNC",