Skip to content

Commit 2a54d92

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f63ad3b commit 2a54d92

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cf_xarray/accessor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2662,16 +2662,16 @@ def assign(self, **standard_variables: Any) -> Dataset:
26622662

26632663
# for each standard name and value pair
26642664
for standard_name, values in standard_variables.items():
2665-
26662665
# default to using existing short name or standard name
26672666
name = getattr(values, "name", standard_name)
26682667

26692668
# add trailing underscores until we find a free slot
26702669
while name in self._obj.data_vars or name in variables:
26712670
emit_user_level_warning(
26722671
f"found existing variable {name}, using {name}_ instead",
2673-
UserWarning)
2674-
name += '_'
2672+
UserWarning,
2673+
)
2674+
name += "_"
26752675

26762676
# map name to values (without coords, see #513, xarray#6447)
26772677
values = xr.as_variable(values)

0 commit comments

Comments
 (0)