Skip to content

Commit 8101eb4

Browse files
Apply ruff/flake8-implicit-str-concat rule ISC001
ISC001 Implicitly concatenated string literals on one line
1 parent 0384363 commit 8101eb4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
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

0 commit comments

Comments
 (0)