diff --git a/bmi_geotiff/bmi.py b/bmi_geotiff/bmi.py index 606b0c9..ce959c8 100644 --- a/bmi_geotiff/bmi.py +++ b/bmi_geotiff/bmi.py @@ -482,7 +482,7 @@ def get_value(self, name: str, dest: numpy.ndarray) -> numpy.ndarray: elif name == self._output_var_names[2]: dest[:] = self._da.rio.transform() else: - raise ValueError("get_value not available for {}.".format(name)) + raise ValueError(f"get_value not available for {name}.") return dest @@ -509,7 +509,7 @@ def get_value_at_indices( dest[:] = self.get_value_ptr(name).reshape(-1)[inds] return dest else: - raise ValueError("get_value_at_indices not available for {}.".format(name)) + raise ValueError(f"get_value_at_indices not available for {name}.") def get_value_ptr(self, name: str) -> numpy.ndarray: """Get a reference to values of the given variable. @@ -531,7 +531,7 @@ def get_value_ptr(self, name: str) -> numpy.ndarray: if name == self._output_var_names[0]: return self._da.values else: - raise ValueError("get_value_ptr not available for {}.".format(name)) + raise ValueError(f"get_value_ptr not available for {name}.") def get_var_grid(self, name: str) -> int: """Get grid identifier for the given variable.