Skip to content

Commit 80cfc4b

Browse files
Merge pull request #358 from ImperialCollegeLondon/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents e8a9cf5 + b48fd27 commit 80cfc4b

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@ repos:
55
- id: check-merge-conflict
66
- id: debug-statements
77
- repo: https://github.com/astral-sh/ruff-pre-commit
8-
rev: "v0.8.3"
8+
rev: "v0.9.10"
99
hooks:
1010
- id: ruff
1111
args: [--fix, --exit-non-zero-on-fix]
1212
- id: ruff-format
1313
- repo: https://github.com/pre-commit/mirrors-mypy
14-
rev: "v1.13.0"
14+
rev: "v1.15.0"
1515
hooks:
1616
- id: mypy
1717
additional_dependencies:
1818
[types-requests, types-PyYAML]
1919
- repo: https://github.com/igorshubovych/markdownlint-cli
20-
rev: v0.43.0
20+
rev: v0.44.0
2121
hooks:
2222
- id: markdownlint
2323
args: ["--disable", "MD013", "--disable", "MD025", "--"]
2424

2525
- repo: https://github.com/codespell-project/codespell
26-
rev: v2.3.0
26+
rev: v2.4.1
2727
hooks:
2828
- id: codespell
2929
name: Check common misspellings in text files with codespell.
3030
additional_dependencies:
3131
- tomli
3232

3333
- repo: https://github.com/tox-dev/pyproject-fmt
34-
rev: v2.5.0
34+
rev: v2.5.1
3535
hooks:
3636
- id: pyproject-fmt
3737
name: Apply a consistent format to pyproject.toml

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ lint.pydocstyle.convention = "google"
114114

115115
[tool.codespell]
116116
skip = "src/swmmanywhere/defs/iso_converter.yml,*.inp,docs/paper/*"
117-
ignore-words-list = "gage,gages,Carrer"
117+
ignore-words-list = "gage,gages,Carrer,anc"
118118

119119
[tool.pytest.ini_options]
120120
addopts = "-v --cov=src/swmmanywhere --cov-report=xml --doctest-modules --ignore=src/swmmanywhere/logging.py"

src/netcomp/distance/exact.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ def lambda_dist(A1, A2, k=None, p=2, kind="laplacian"):
192192
evals1, evals2 = [evals[::-1] for evals in [evals1, evals2]]
193193
else:
194194
raise InputError(
195-
"Invalid type, choose from 'laplacian', "
196-
"'laplacian_norm', and 'adjacency'."
195+
"Invalid type, choose from 'laplacian', 'laplacian_norm', and 'adjacency'."
197196
)
198197
dist = la.norm(evals1[:k] - evals2[:k], ord=p)
199198
return dist

src/netcomp/linalg/resistance.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def resistance_matrix(A, check_connected=True):
7171
G = nx.from_numpy_array(A)
7272
if not nx.is_connected(G):
7373
raise UndefinedException(
74-
"Graph is not connected. " "Resistance matrix is undefined."
74+
"Graph is not connected. Resistance matrix is undefined."
7575
)
7676
L = laplacian_matrix(A)
7777
with suppress(Exception):

src/swmmanywhere/swmmanywhere.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def swmmanywhere(config: dict) -> tuple[Path, dict | None]:
8888
logger.info(f"Project structure created at {addresses.project_paths.base_dir}")
8989
logger.info(f"Project name: {config['project']}")
9090
logger.info(
91-
f"""Bounding box: {config['bbox']},
91+
f"""Bounding box: {config["bbox"]},
9292
number: {addresses.bbox_paths.bbox_number}"""
9393
)
9494
logger.info(f"Model number: {addresses.model_paths.model_number}")
@@ -279,7 +279,7 @@ def check_starting_graph(config: dict):
279279
if not config["starting_graph"].exists():
280280
raise FileNotFoundError(
281281
f"""starting_graph not found at
282-
{config['starting_graph']}"""
282+
{config["starting_graph"]}"""
283283
)
284284

285285
return config

tests/test_swmmanywhere.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_swmmanywhere(run):
9898
assert set(metrics.keys()) == set(config["metric_list"])
9999

100100
# Check results were saved
101-
assert (inp.parent / f'{config["graphfcn_list"][-1]}_graph.json').exists()
101+
assert (inp.parent / f"{config['graphfcn_list'][-1]}_graph.json").exists()
102102
assert inp.exists()
103103
assert (inp.parent / "results.parquet").exists()
104104
assert (config["real"]["inp"].parent / "real_results.parquet").exists()

0 commit comments

Comments
 (0)