Skip to content

Commit 6388644

Browse files
authored
Bump to ruff 0.10.0 and fix violations (#3850)
* Bump ruff from 0.9.6 to 0.10.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.6 to 0.10.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.9.6...0.10.0) * Fix SIM905 split-static-string violations Xref https://docs.astral.sh/ruff/rules/split-static-string/
1 parent 6a88408 commit 6388644

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
# Dev dependencies (style checks)
2828
- codespell
2929
- pre-commit
30-
- ruff>=0.9.6
30+
- ruff>=0.10.0
3131
# Dev dependencies (unit testing)
3232
- matplotlib-base
3333
- pytest>=6.0

pygmt/tests/test_datasets_load_remote_datasets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_load_remote_dataset_invalid_resolutions():
4141
"""
4242
Make sure _load_remote_dataset fails for invalid resolutions.
4343
"""
44-
resolutions = "1m 1d bla 60d 001m 03".split()
44+
resolutions = ["1m", "1d", "bla", "60d", "001m", "03"]
4545
resolutions.append(60)
4646
for resolution in resolutions:
4747
with pytest.raises(GMTInvalidInput):

pygmt/tests/test_figure.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,20 @@ def test_figure_savefig_exists():
8383
fig = Figure()
8484
fig.basemap(region="10/70/-300/800", projection="X3i/5i", frame="af")
8585
prefix = "test_figure_savefig_exists"
86-
for fmt in "bmp eps jpg jpeg pdf png ppm tif PNG JPG JPEG Png".split():
86+
for fmt in [
87+
"bmp",
88+
"eps",
89+
"jpg",
90+
"jpeg",
91+
"pdf",
92+
"png",
93+
"ppm",
94+
"tif",
95+
"PNG",
96+
"JPG",
97+
"JPEG",
98+
"Png",
99+
]:
87100
fname = Path(f"{prefix}.{fmt}")
88101
fig.savefig(fname)
89102
assert fname.exists()
@@ -192,7 +205,7 @@ def test_figure_savefig_transparent():
192205
fig = Figure()
193206
fig.basemap(region="10/70/-300/800", projection="X3i/5i", frame="af")
194207
prefix = "test_figure_savefig_transparent"
195-
for fmt in "pdf jpg bmp eps tif".split():
208+
for fmt in ["pdf", "jpg", "bmp", "eps", "tif"]:
196209
fname = f"{prefix}.{fmt}"
197210
with pytest.raises(GMTInvalidInput):
198211
fig.savefig(fname, transparent=True)

0 commit comments

Comments
 (0)