Skip to content

Commit 65cb6d5

Browse files
committed
Further clarification of typing comment
1 parent e41a0e5 commit 65cb6d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/iris/pandas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ def format_dimensional_metadata(dm_class_, values_, name_, dimensions_):
497497
# for this object. _series_index_unique should have ensured
498498
# that we are indeed removing the duplicates.
499499
shaped = content.reshape(cube_shape)
500-
indices: list = [0] * len(
501-
cube_shape
502-
) # static typing added to aid mypy type checking
500+
# Static typing `indices` needed to avoid mypy call-overload error
501+
# from assuming int instead of list for later slicing
502+
indices: list = [0] * len(cube_shape)
503503
for dim in dimensions:
504504
indices[dim] = slice(None)
505505
collapsed = shaped[tuple(indices)]

0 commit comments

Comments
 (0)