Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit hooks #88

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading