Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 16, 2024
1 parent 2bb6e61 commit 063e45b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/iris/_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,11 @@ def _deepcopy(self, memo, data=None):
try:
if iris.FUTURE.dataless_cube and data is None:
shape = self.shape
elif (iris.FUTURE.dataless_cube and type(data) is str and data == iris.MAINTAIN_DATA) or (
data is None
):
elif (
iris.FUTURE.dataless_cube
and type(data) is str
and data == iris.MAINTAIN_DATA
) or (data is None):
# Copy the managed data.
if self.has_lazy_data():
data = copy.deepcopy(self._lazy_array, memo)
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/unit/cube/test_Cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,7 +2090,7 @@ def test_copy_new_data(self):
_shared_utils.assert_array_equal(new_cube.data, new_data)

def test_copy_remove_data(self):
with iris.FUTURE.context(dataless_cube = True):
with iris.FUTURE.context(dataless_cube=True):
cube = stock.simple_3d()
new_cube = cube.copy()
assert new_cube.metadata == cube.metadata
Expand Down

0 comments on commit 063e45b

Please sign in to comment.