From c10c711c6abaa86883d44a87193a6a9c38e2b7aa Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Wed, 26 Aug 2020 19:54:13 +1200 Subject: [PATCH] Fix pylint 2.6.0 raise-missing-from warning --- pygmt/clib/session.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/clib/session.py b/pygmt/clib/session.py index ee538f7a50e..31831d1cdfc 100644 --- a/pygmt/clib/session.py +++ b/pygmt/clib/session.py @@ -725,10 +725,10 @@ def _check_dtype_and_dim(self, array, ndim): try: # Try to convert any unknown numpy data types to np.datetime64 array = np.asarray(array, dtype=np.datetime64) - except ValueError: + except ValueError as e: raise GMTInvalidInput( - "Unsupported numpy data type '{}'.".format(array.dtype.type) - ) + f"Unsupported numpy data type '{array.dtype.type}'." + ) from e return self[DTYPES[array.dtype.type]] def put_vector(self, dataset, column, vector):