Skip to content

Commit 8286d7e

Browse files
committed
Black lint code
1 parent 847814b commit 8286d7e

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

pygmt/exceptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class GMTVersionError(GMTError):
4545
Raised when an incompatible version of GMT is being used.
4646
"""
4747

48+
4849
class GMTImageComparisonFailure(AssertionError):
4950
"""
5051
Raised when a comparison between two images fails.

pygmt/helpers/testing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def check_figures_equal(fig_ref, fig_test, fig_prefix=None, tol=0.0):
1616

1717
os.makedirs(result_dir, exist_ok=True)
1818

19-
ref_image_path = os.path.join(result_dir, fig_prefix + '-expected.png')
20-
test_image_path = os.path.join(result_dir, fig_prefix + '.png')
19+
ref_image_path = os.path.join(result_dir, fig_prefix + "-expected.png")
20+
test_image_path = os.path.join(result_dir, fig_prefix + ".png")
2121

2222
fig_ref.savefig(ref_image_path)
2323
fig_test.savefig(test_image_path)
@@ -31,5 +31,5 @@ def check_figures_equal(fig_ref, fig_test, fig_prefix=None, tol=0.0):
3131
for key in ["actual", "expected"]:
3232
err[key] = os.path.relpath(err[key])
3333
raise GMTImageComparisonFailure(
34-
'images not close (RMS %(rms).3f):\n\t%(actual)s\n\t%(expected)s '
35-
% err)
34+
"images not close (RMS %(rms).3f):\n\t%(actual)s\n\t%(expected)s " % err
35+
)

pygmt/tests/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import pygmt
22
from matplotlib.testing.decorators import check_figures_equal
33

4-
@check_figures_equal(extensions=['png'])
4+
5+
@check_figures_equal(extensions=["png"])
56
def test_plot(fig_test, fig_ref):
67
fig_test.subplots().plot([1, 3, 5])
78
fig_ref.subplots().plot([0, 1, 2], [1, 3, 5])

pygmt/tests/test_grdimage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def test_grdimage_over_dateline(xrgrid):
9898

9999
def test_grdimage_central_longitude(grid):
100100
fig1 = Figure()
101-
fig1.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap='geo')
101+
fig1.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo")
102102

103103
fig2 = Figure()
104-
fig2.grdimage(grid, projection="W120/15c", cmap='geo')
104+
fig2.grdimage(grid, projection="W120/15c", cmap="geo")
105105

106106
check_figures_equal(fig1, fig2)

0 commit comments

Comments
 (0)