Skip to content

Commit 882b5b2

Browse files
authored
Fix pylint 2.6.0 raise-missing-from warning (#570)
1 parent ae92da2 commit 882b5b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygmt/clib/session.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,10 @@ def _check_dtype_and_dim(self, array, ndim):
725725
try:
726726
# Try to convert any unknown numpy data types to np.datetime64
727727
array = np.asarray(array, dtype=np.datetime64)
728-
except ValueError:
728+
except ValueError as e:
729729
raise GMTInvalidInput(
730-
"Unsupported numpy data type '{}'.".format(array.dtype.type)
731-
)
730+
f"Unsupported numpy data type '{array.dtype.type}'."
731+
) from e
732732
return self[DTYPES[array.dtype.type]]
733733

734734
def put_vector(self, dataset, column, vector):

0 commit comments

Comments
 (0)