Skip to content

Commit 93bf8a1

Browse files
committed
Get 'create_cf_data_variable' to call 'create_generic_cf_array_var': Mostly working?
1 parent a0a969b commit 93bf8a1

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lib/iris/fileformats/_nc_load_rules/helpers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,13 @@ def build_and_add_global_attributes(engine: Engine):
708708
),
709709
)
710710
if problem is not None:
711-
stack_notes = problem.stack_trace.__notes__
711+
stack_notes = problem.stack_trace.__notes__ # type: ignore[attr-defined]
712712
if stack_notes is None:
713713
stack_notes = []
714714
stack_notes.append(
715715
f"Skipping disallowed global attribute '{attr_name}' (see above error)"
716716
)
717-
problem.stack_trace.__notes__ = stack_notes
717+
problem.stack_trace.__notes__ = stack_notes # type: ignore[attr-defined]
718718

719719

720720
################################################################################
@@ -1536,14 +1536,14 @@ def build_and_add_dimension_coordinate(
15361536
)
15371537
if problem is not None:
15381538
coord_var_name = str(cf_coord_var.cf_name)
1539-
stack_notes = problem.stack_trace.__notes__
1539+
stack_notes = problem.stack_trace.__notes__ # type: ignore[attr-defined]
15401540
if stack_notes is None:
15411541
stack_notes = []
15421542
stack_notes.append(
15431543
f"Failed to create {coord_var_name} dimension coordinate:\n"
15441544
f"Gracefully creating {coord_var_name!r} auxiliary coordinate instead."
15451545
)
1546-
problem.stack_trace.__notes__ = stack_notes
1546+
problem.stack_trace.__notes__ = stack_notes # type: ignore[attr-defined]
15471547
problem.handled = True
15481548

15491549
_ = _add_or_capture(

lib/iris/fileformats/netcdf/saver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,12 +990,12 @@ def _add_aux_coords(
990990
]
991991

992992
# Include any relevant mesh location coordinates.
993-
mesh: MeshXY | None = getattr(cube, "mesh")
994-
mesh_location: str | None = getattr(cube, "location")
993+
mesh: MeshXY | None = getattr(cube, "mesh") # type: ignore[annotation-unchecked]
994+
mesh_location: str | None = getattr(cube, "location") # type: ignore[annotation-unchecked]
995995
if mesh and mesh_location:
996996
location_coords: MeshNodeCoords | MeshEdgeCoords | MeshFaceCoords = getattr(
997997
mesh, f"{mesh_location}_coords"
998-
)
998+
) # type: ignore[annotation-unchecked]
999999
coords_to_add.extend(list(location_coords))
10001000

10011001
return self._add_inner_related_vars(

lib/iris/tests/integration/netcdf/test_chararrays.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def show_result(filepath):
101101

102102
@pytest.mark.parametrize("encoding", tsts)
103103
def test_encodings(encoding):
104+
# small change
104105
print(f"\n=========\nTesting encoding: {encoding}")
105106
filepath = f"tmp_{str(encoding)}.nc"
106107
do_as = encoding

0 commit comments

Comments
 (0)