Skip to content

Commit

Permalink
Update pre-commit hooks
Browse files Browse the repository at this point in the history
(It's been a few months)
  • Loading branch information
eriknw committed Feb 11, 2025
1 parent ca0e535 commit 77ff0d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ repos:
- id: autoflake
args: [--in-place]
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py310-plus]
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
# - id: black-jupyter # Consider adding this
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.9.6
hooks:
- id: ruff
args: [--fix-only, --show-fixes] # --unsafe-fixes]
Expand All @@ -63,29 +63,29 @@ repos:
additional_dependencies: &flake8_dependencies
# These versions need updated manually
- flake8==7.1.1
- flake8-bugbear==24.10.31
- flake8-bugbear==24.12.12
- flake8-simplify==0.21.0
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
additional_dependencies: *flake8_dependencies
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
types_or: [python, rst, markdown]
additional_dependencies: [tomli]
files: ^(nx_cugraph|docs)/
args: ["-L thirdparty,coo,COO,numer"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.9.6
hooks:
- id: ruff
# Don't have strict linting for miscellaneous code
args: [--extend-exclude, "benchmarks/,ci/,docs/,notebooks/"]
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.17.0
rev: v1.17.1
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
Expand Down Expand Up @@ -126,7 +126,7 @@ repos:
- id: sphinx-lint
args: ["--enable=all", "--disable=line-too-long"]
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v0.4.0
rev: v0.6.0
hooks:
- id: verify-copyright
files: |
Expand Down
8 changes: 3 additions & 5 deletions benchmarks/pytest-based/create_results_summary_page.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION.
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -50,8 +50,7 @@ def get_all_benchmark_info():
name = benchmark_run["name"]

algo_name = name.split("[")[0]
if algo_name.startswith("bench_"):
algo_name = algo_name[6:]
algo_name = algo_name.removeprefix("bench_")
# special case for betweenness_centrality
match = k_patt.match(name)
if match is not None:
Expand All @@ -63,8 +62,7 @@ def get_all_benchmark_info():
f"benchmark name {name} in file {json_file} has an unexpected format"
)
dataset = match.group(1)
if dataset.endswith("-backend"):
dataset = dataset[:-8]
dataset = dataset.removesuffix("-backend")

match = backend_patt.match(name)
if match is None:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ ignore = [
# "TRY004", # Prefer `TypeError` exception for invalid type (Note: good advice, but not worth the nuisance)
"B020", # Found for loop that reassigns the iterable it is iterating with each iterable value (too strict)
"B904", # Bare `raise` inside exception clause (like TRY200; sometimes okay)
"RUF021", # parenthesize-chained-operators (Note: use our judgement for what is more clear)
"RUF022", # unsorted-dunder-all (Note: probably okay, but noisy)
"S310", # Audit URL open for permitted schemes (Note: we don't download URLs in normal usage)

# Intentionally ignored
Expand Down

0 comments on commit 77ff0d6

Please sign in to comment.