Skip to content

Commit e312814

Browse files
authored
ruff & update notebooks (#477)
* bump ruff version in pre-commit * reup ruff formatting * format notebooks * rerun notebooks * update pyproject.toml
1 parent 49f97b0 commit e312814

22 files changed

+16877
-13266
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
files: "spopt\/"
1+
files: "spopt\/|notebooks\/"
22
repos:
33
- repo: https://github.com/astral-sh/ruff-pre-commit
44
rev: "v0.11.4"

notebooks/azp.ipynb

+99-99
Large diffs are not rendered by default.

notebooks/component_policy.ipynb

+332-285
Large diffs are not rendered by default.

notebooks/facloc-disperse-real-world.ipynb

+283-230
Large diffs are not rendered by default.

notebooks/facloc-lscpb-real-world.ipynb

+386-279
Large diffs are not rendered by default.

notebooks/facloc-real-world.ipynb

+416-288
Large diffs are not rendered by default.

notebooks/lscp.ipynb

+230-207
Large diffs are not rendered by default.

notebooks/lscp_capacity.ipynb

+303-288
Large diffs are not rendered by default.

notebooks/lscp_gis.ipynb

+5,173-3,803
Large diffs are not rendered by default.

notebooks/lscpb.ipynb

+290-257
Large diffs are not rendered by default.

notebooks/maxp.ipynb

+171-170
Large diffs are not rendered by default.

notebooks/mclp.ipynb

+250-227
Large diffs are not rendered by default.

notebooks/mclp_gis.ipynb

+6,581-4,891
Large diffs are not rendered by default.

notebooks/p-center.ipynb

+231-208
Large diffs are not rendered by default.

notebooks/p-dispersion.ipynb

+234-214
Large diffs are not rendered by default.

notebooks/p-median.ipynb

+304-282
Large diffs are not rendered by default.

notebooks/p-median_variations.ipynb

+664-635
Large diffs are not rendered by default.

notebooks/randomregion.ipynb

+435-410
Large diffs are not rendered by default.

notebooks/reg-k-means.ipynb

+176-181
Large diffs are not rendered by default.

notebooks/skater.ipynb

+237-235
Large diffs are not rendered by default.

notebooks/ward.ipynb

+77-76
Large diffs are not rendered by default.

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,17 @@ include = ["spopt", "spopt.*"]
8181

8282
[tool.ruff]
8383
line-length = 88
84+
extend-include = ["*.ipynb"]
8485
lint.select = ["E", "F", "W", "I", "UP", "N", "B", "A", "C4", "SIM", "ARG"]
8586

8687
[tool.ruff.lint.per-file-ignores]
8788
"*__init__.py" = [
8889
"F401", # imported but unused
8990
"F403", # star import; unable to detect undefined names
9091
]
92+
"*.ipynb" = [
93+
"F401", # imported but unused
94+
]
9195

9296
[tool.coverage.run]
9397
source = ["./spopt"]

0 commit comments

Comments
 (0)