@@ -71,14 +71,14 @@ class esm_datastore(Catalog):
71
71
72
72
def __init__ (
73
73
self ,
74
- obj : typing .Union [pydantic .FilePath , pydantic .AnyUrl , typing . Dict [str , typing .Any ]],
74
+ obj : typing .Union [pydantic .FilePath , pydantic .AnyUrl , dict [str , typing .Any ]],
75
75
* ,
76
76
progressbar : bool = True ,
77
77
sep : str = '.' ,
78
78
registry : typing .Optional [DerivedVariableRegistry ] = None ,
79
- read_csv_kwargs : typing . Dict [str , typing .Any ] = None ,
80
- storage_options : typing . Dict [str , typing .Any ] = None ,
81
- ** intake_kwargs : typing . Dict [str , typing .Any ],
79
+ read_csv_kwargs : dict [str , typing .Any ] = None ,
80
+ storage_options : dict [str , typing .Any ] = None ,
81
+ ** intake_kwargs : dict [str , typing .Any ],
82
82
):
83
83
84
84
"""Intake Catalog representing an ESM Collection."""
@@ -113,7 +113,7 @@ def _validate_derivedcat(self) -> None:
113
113
f'Derived variable { key } depends on unknown column { col } in query: { entry .query } . Valid ESM catalog columns: { self .esmcat .df .columns .tolist ()} .'
114
114
)
115
115
116
- def keys (self ) -> typing . List [str ]:
116
+ def keys (self ) -> list [str ]:
117
117
"""
118
118
Get keys for the catalog entries
119
119
@@ -182,7 +182,7 @@ def df(self) -> pd.DataFrame:
182
182
def __len__ (self ) -> int :
183
183
return len (self .keys ())
184
184
185
- def _get_entries (self ) -> typing . Dict [str , ESMDataSource ]:
185
+ def _get_entries (self ) -> dict [str , ESMDataSource ]:
186
186
# Due to just-in-time entry creation, we may not have all entries loaded
187
187
# We need to make sure to create entries missing from self._entries
188
188
missing = set (self .keys ()) - set (self ._entries .keys ())
@@ -283,7 +283,7 @@ def _ipython_display_(self):
283
283
contents = self ._repr_html_ ()
284
284
display (HTML (contents ))
285
285
286
- def __dir__ (self ) -> typing . List [str ]:
286
+ def __dir__ (self ) -> list [str ]:
287
287
rv = [
288
288
'df' ,
289
289
'to_dataset_dict' ,
@@ -304,9 +304,7 @@ def _ipython_key_completions_(self):
304
304
return self .__dir__ ()
305
305
306
306
@pydantic .validate_arguments
307
- def search (
308
- self , require_all_on : typing .Union [str , typing .List [str ]] = None , ** query : typing .Any
309
- ):
307
+ def search (self , require_all_on : typing .Union [str , list [str ]] = None , ** query : typing .Any ):
310
308
"""Search for entries in the catalog.
311
309
312
310
Parameters
@@ -419,9 +417,9 @@ def serialize(
419
417
name : pydantic .StrictStr ,
420
418
directory : typing .Union [pydantic .DirectoryPath , pydantic .StrictStr ] = None ,
421
419
catalog_type : str = 'dict' ,
422
- to_csv_kwargs : typing . Dict [typing .Any , typing .Any ] = None ,
423
- json_dump_kwargs : typing . Dict [typing .Any , typing .Any ] = None ,
424
- storage_options : typing . Dict [str , typing .Any ] = None ,
420
+ to_csv_kwargs : dict [typing .Any , typing .Any ] = None ,
421
+ json_dump_kwargs : dict [typing .Any , typing .Any ] = None ,
422
+ storage_options : dict [str , typing .Any ] = None ,
425
423
) -> None :
426
424
"""Serialize catalog to corresponding json and csv files.
427
425
@@ -508,15 +506,15 @@ def unique(self) -> pd.Series:
508
506
@pydantic .validate_arguments
509
507
def to_dataset_dict (
510
508
self ,
511
- xarray_open_kwargs : typing . Dict [str , typing .Any ] = None ,
512
- xarray_combine_by_coords_kwargs : typing . Dict [str , typing .Any ] = None ,
509
+ xarray_open_kwargs : dict [str , typing .Any ] = None ,
510
+ xarray_combine_by_coords_kwargs : dict [str , typing .Any ] = None ,
513
511
preprocess : typing .Callable = None ,
514
- storage_options : typing . Dict [pydantic .StrictStr , typing .Any ] = None ,
512
+ storage_options : dict [pydantic .StrictStr , typing .Any ] = None ,
515
513
progressbar : pydantic .StrictBool = None ,
516
514
aggregate : pydantic .StrictBool = None ,
517
515
skip_on_error : pydantic .StrictBool = False ,
518
516
** kwargs ,
519
- ) -> typing . Dict [str , xr .Dataset ]:
517
+ ) -> dict [str , xr .Dataset ]:
520
518
"""
521
519
Load catalog entries into a dictionary of xarray datasets.
522
520
@@ -654,10 +652,10 @@ def to_dataset_dict(
654
652
@pydantic .validate_arguments
655
653
def to_datatree (
656
654
self ,
657
- xarray_open_kwargs : typing . Dict [str , typing .Any ] = None ,
658
- xarray_combine_by_coords_kwargs : typing . Dict [str , typing .Any ] = None ,
655
+ xarray_open_kwargs : dict [str , typing .Any ] = None ,
656
+ xarray_combine_by_coords_kwargs : dict [str , typing .Any ] = None ,
659
657
preprocess : typing .Callable = None ,
660
- storage_options : typing . Dict [pydantic .StrictStr , typing .Any ] = None ,
658
+ storage_options : dict [pydantic .StrictStr , typing .Any ] = None ,
661
659
progressbar : pydantic .StrictBool = None ,
662
660
aggregate : pydantic .StrictBool = None ,
663
661
skip_on_error : pydantic .StrictBool = False ,
0 commit comments