Skip to content

Commit 3a4ff9b

Browse files
Apply ruff/flake8-implicit-str-concat rules (ISC) (#9722)
* Apply ruff/flake8-implicit-str-concat rule ISC001 ISC001 Implicitly concatenated string literals on one line * Apply ruff/flake8-implicit-str-concat rule ISC003 ISC003 Explicitly concatenated string should be implicitly concatenated
1 parent 6940022 commit 3a4ff9b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

xarray/core/dataset.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4772,9 +4772,7 @@ def expand_dims(
47724772
if d in self.dims:
47734773
raise ValueError(f"Dimension {d} already exists.")
47744774
if d in self._variables and not utils.is_scalar(self._variables[d]):
4775-
raise ValueError(
4776-
f"{d} already exists as coordinate or" " variable name."
4777-
)
4775+
raise ValueError(f"{d} already exists as coordinate or variable name.")
47784776

47794777
variables: dict[Hashable, Variable] = {}
47804778
indexes: dict[Hashable, Index] = dict(self._indexes)
@@ -4801,7 +4799,7 @@ def expand_dims(
48014799
pass # Do nothing if the dimensions value is just an int
48024800
else:
48034801
raise TypeError(
4804-
f"The value of new dimension {k} must be " "an iterable or an int"
4802+
f"The value of new dimension {k} must be an iterable or an int"
48054803
)
48064804

48074805
for k, v in self._variables.items():

xarray/core/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ def _oindex_set(self, indexer: OuterIndexer, value: Any) -> None:
16401640
num_non_slices = sum(0 if isinstance(k, slice) else 1 for k in indexer.tuple)
16411641
if num_non_slices > 1:
16421642
raise NotImplementedError(
1643-
"xarray can't set arrays with multiple " "array indices to dask yet."
1643+
"xarray can't set arrays with multiple array indices to dask yet."
16441644
)
16451645
self.array[indexer.tuple] = value
16461646

xarray/plot/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ def _infer_interval_breaks(coord, axis=0, scale=None, check_monotonic=False):
870870
if (coord <= 0).any():
871871
raise ValueError(
872872
"Found negative or zero value in coordinates. "
873-
+ "Coordinates must be positive on logscale plots."
873+
"Coordinates must be positive on logscale plots."
874874
)
875875
coord = np.log10(coord)
876876

0 commit comments

Comments
 (0)