Skip to content

Commit c71148e

Browse files
committed
bump linting again
1 parent 18f2e28 commit c71148e

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

.pre-commit-config.yaml

+13-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ default_language_version:
1616
python: python3
1717
repos:
1818
- repo: https://github.com/pre-commit/pre-commit-hooks
19-
rev: v4.5.0
19+
rev: v4.6.0
2020
hooks:
2121
- id: check-added-large-files
2222
- id: check-case-conflict
@@ -33,13 +33,13 @@ repos:
3333
- id: name-tests-test
3434
args: ["--pytest-test-first"]
3535
- repo: https://github.com/abravalheri/validate-pyproject
36-
rev: v0.16
36+
rev: v0.18
3737
hooks:
3838
- id: validate-pyproject
3939
name: Validate pyproject.toml
4040
# I don't yet trust ruff to do what autoflake does
4141
- repo: https://github.com/PyCQA/autoflake
42-
rev: v2.3.0
42+
rev: v2.3.1
4343
hooks:
4444
- id: autoflake
4545
args: [--in-place]
@@ -48,32 +48,33 @@ repos:
4848
hooks:
4949
- id: isort
5050
- repo: https://github.com/asottile/pyupgrade
51-
rev: v3.15.1
51+
rev: v3.16.0
5252
hooks:
5353
- id: pyupgrade
5454
args: [--py310-plus]
5555
- repo: https://github.com/MarcoGorelli/auto-walrus
56-
rev: v0.2.2
56+
rev: 0.3.4
5757
hooks:
5858
- id: auto-walrus
59+
additional_dependencies: [tomli]
5960
args: [--line-length, "100"]
6061
- repo: https://github.com/psf/black
61-
rev: 24.2.0
62+
rev: 24.4.2
6263
hooks:
6364
- id: black
6465
# - id: black-jupyter
6566
- repo: https://github.com/astral-sh/ruff-pre-commit
66-
rev: v0.2.2
67+
rev: v0.5.0
6768
hooks:
6869
- id: ruff
6970
args: [--fix-only, --show-fixes]
7071
- repo: https://github.com/PyCQA/flake8
71-
rev: 7.0.0
72+
rev: 7.1.0
7273
hooks:
7374
- id: flake8
7475
additional_dependencies: &flake8_dependencies
7576
# These versions need updated manually
76-
- flake8==7.0.0
77+
- flake8==7.1.0
7778
- flake8-bugbear==24.2.6
7879
- flake8-simplify==0.21.0
7980
- repo: https://github.com/asottile/yesqa
@@ -82,14 +83,14 @@ repos:
8283
- id: yesqa
8384
additional_dependencies: *flake8_dependencies
8485
- repo: https://github.com/codespell-project/codespell
85-
rev: v2.2.6
86+
rev: v2.3.0
8687
hooks:
8788
- id: codespell
8889
types_or: [python, rst, markdown]
8990
additional_dependencies: [tomli]
9091
files: ^(graphblas_algorithms|docs)/
9192
- repo: https://github.com/astral-sh/ruff-pre-commit
92-
rev: v0.2.2
93+
rev: v0.5.0
9394
hooks:
9495
- id: ruff
9596
# `pyroma` may help keep our package standards up to date if best practices change.
@@ -100,6 +101,6 @@ repos:
100101
- id: pyroma
101102
args: [-n, "10", .]
102103
- repo: https://github.com/pre-commit/pre-commit-hooks
103-
rev: v4.5.0
104+
rev: v4.6.0
104105
hooks:
105106
- id: no-commit-to-branch # no commit directly to main

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ T5 = nx.k_truss(G2, 5)
9191
```
9292

9393
`G2` is not a `nx.Graph`, but it does have an attribute
94-
`__networkx_plugin__ = "graphblas"`. This tells NetworkX to
94+
`__networkx_backend__ = "graphblas"`. This tells NetworkX to
9595
dispatch the k_truss call to graphblas-algorithms. This link
9696
connection exists because graphblas-algorithms registers
9797
itself as a "networkx.plugin" entry point.

pyproject.toml

+10-1
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ dependencies = [
6161
"python-graphblas >=2023.1.0",
6262
]
6363

64+
# nx < 3.2
6465
[project.entry-points."networkx.plugins"]
6566
graphblas = "graphblas_algorithms.interface:Dispatcher"
6667

68+
[project.entry-points."networkx.plugins_info"]
69+
graphblas = "_nx_graphblas:get_info"
70+
71+
# nx >= 3.2
6772
[project.entry-points."networkx.backends"]
6873
graphblas = "graphblas_algorithms.interface:Dispatcher"
6974

@@ -202,6 +207,10 @@ ignore = [
202207
"PLE0605", # Invalid format for `__all__`, must be `tuple` or `list` (Note: broken in v0.0.237)
203208

204209
# Maybe consider
210+
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
211+
"FURB177", # Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
212+
"S113", # Probable use of requests call without timeout
213+
"SIM103", # Return the condition `bool(mask.reduce(monoid.lor))` directly
205214
# "SIM300", # Yoda conditions are discouraged, use ... instead (Note: we're not this picky)
206215
# "SIM401", # Use dict.get ... instead of if-else-block (Note: if-else better for coverage and sometimes clearer)
207216
# "TRY004", # Prefer `TypeError` exception for invalid type (Note: good advice, but not worth the nuisance)
@@ -271,5 +280,5 @@ builtins-ignorelist = ["copyright"]
271280
fixture-parentheses = false
272281
mark-parentheses = false
273282

274-
[tool.lint.ruff.pydocstyle]
283+
[tool.ruff.lint.pydocstyle]
275284
convention = "numpy"

0 commit comments

Comments
 (0)