@@ -415,10 +415,12 @@ def __init__(self, properties: Dict[str, Any]) -> None:
415
415
416
416
@property
417
417
def dimensions (self ) -> List [str ]:
418
- """The dimensions of hte variable. Should refer to keys in the `cube:dimensions` object
418
+ """The dimensions of the variable. Should refer to keys in the `cube:dimensions` object
419
419
or be an empty list if the variable has no dimensions"""
420
420
return get_required (
421
- self .properties .get (DIM_DIMENSIONS_PROP ), "cube:variable" , DIM_DIMENSIONS_PROP
421
+ self .properties .get (DIM_DIMENSIONS_PROP ),
422
+ "cube:variable" ,
423
+ DIM_DIMENSIONS_PROP ,
422
424
)
423
425
424
426
@dimensions .setter
@@ -443,7 +445,7 @@ def description(self) -> Optional[str]:
443
445
return self .properties .get (DIM_DESC_PROP )
444
446
445
447
@description .setter
446
- def description (self , v : Optional [str ]):
448
+ def description (self , v : Optional [str ]) -> None :
447
449
if v is None :
448
450
self .properties .pop (DIM_DESC_PROP , None )
449
451
else :
@@ -452,16 +454,16 @@ def description(self, v: Optional[str]):
452
454
@property
453
455
def extent (self ) -> List [Union [float , str , None ]]:
454
456
"""If the variable consists of `ordinal values
455
- <https://en.wikipedia.org/wiki/Level_of_measurement#Ordinal_scale>`, the extent (lower and upper bounds) of the
456
- values as two-dimensional array. Use `None` for open intervals"""
457
- return self .properties .get (DIM_EXTENT_PROP )
457
+ <https://en.wikipedia.org/wiki/Level_of_measurement#Ordinal_scale>`, the extent
458
+ (lower and upper bounds) of the values as two-dimensional array. Use `None` for
459
+ open intervals"""
460
+ return get_required (
461
+ self .properties .get (DIM_EXTENT_PROP ), "cube:variable" , DIM_EXTENT_PROP
462
+ )
458
463
459
464
@extent .setter
460
- def extent (self , v : Optional [List [Union [float , str , None ]]]):
461
- if v is None :
462
- self .properties .pop (DIM_EXTENT_PROP )
463
- else :
464
- self .properties [DIM_EXTENT_PROP ] = v
465
+ def extent (self , v : List [Union [float , str , None ]]) -> None :
466
+ self .properties [DIM_EXTENT_PROP ] = v
465
467
466
468
@property
467
469
def values (self ) -> Optional [List [Union [float , str ]]]:
@@ -470,7 +472,7 @@ def values(self) -> Optional[List[Union[float, str]]]:
470
472
return self .properties .get (DIM_VALUES_PROP )
471
473
472
474
@values .setter
473
- def values (self , v : Optional [List [Union [float , str ]]]):
475
+ def values (self , v : Optional [List [Union [float , str ]]]) -> None :
474
476
if v is None :
475
477
self .properties .pop (DIM_VALUES_PROP )
476
478
else :
@@ -483,7 +485,7 @@ def unit(self) -> Optional[str]:
483
485
return self .properties .get (DIM_UNIT_PROP )
484
486
485
487
@unit .setter
486
- def unit (self , v : Optional [str ]):
488
+ def unit (self , v : Optional [str ]) -> None :
487
489
if v is None :
488
490
self .properties .pop (DIM_UNIT_PROP )
489
491
else :
0 commit comments