Skip to content

Commit cb5e888

Browse files
authored
Update types (#564)
1 parent 921490b commit cb5e888

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cf_xarray/accessor.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2726,7 +2726,9 @@ def grid_mapping_names(self) -> dict[str, list[str]]:
27262726
results[v].append(k)
27272727
return results
27282728

2729-
def decode_vertical_coords(self, *, outnames=None, prefix=None):
2729+
def decode_vertical_coords(
2730+
self, *, outnames: dict[str, str] | None = None, prefix: str | None = None
2731+
) -> None:
27302732
"""
27312733
Decode parameterized vertical coordinates in place.
27322734
@@ -2764,6 +2766,7 @@ def decode_vertical_coords(self, *, outnames=None, prefix=None):
27642766
allterms = self.formula_terms
27652767

27662768
for dim in allterms:
2769+
dim = cast(str, dim)
27672770
if prefix is None:
27682771
assert outnames is not None, (
27692772
"if prefix is None, outnames must be provided"

cf_xarray/parametric.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def from_terms(cls, terms: dict):
782782
return cls(**get_terms(terms, "sigma", "depth", "z1", "z2", "a", "href", "k_c"))
783783

784784

785-
TRANSFORM_FROM_STDNAME = {
785+
TRANSFORM_FROM_STDNAME: dict[str, type[ParametricVerticalCoordinate]] = {
786786
"atmosphere_ln_pressure_coordinate": AtmosphereLnPressure,
787787
"atmosphere_sigma_coordinate": AtmosphereSigma,
788788
"atmosphere_hybrid_sigma_pressure_coordinate": AtmosphereHybridSigmaPressure,

0 commit comments

Comments
 (0)