File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# standard library
55import tarfile
66from pathlib import Path
7+ from typing import Any , Literal , overload
78
89
910# dependencies
@@ -79,14 +80,24 @@ def download(
7980 return data_path .with_name (dir_name )
8081
8182
82- def list (format : str = DEFAULT_LIST_FORMAT ) -> str :
83+ @overload
84+ def list (format : Literal ["csv" , "json" , "markdown" ]) -> str :
85+ ...
86+
87+
88+ @overload
89+ def list (format : Literal ["dict" ]) -> dict [str , str ]:
90+ ...
91+
92+
93+ def list (format : str = DEFAULT_LIST_FORMAT ) -> Any :
8394 """List DESHIMA raw datasets available in the package.
8495
8596 Args:
8697 format: Format of the list that can be output by pandas.
8798
8899 Returns:
89- String of the list with given format.
100+ The list of DESHIMA raw datasets with given format.
90101
91102 """
92103 return getattr (DATA_LIST , f"to_{ format } " )()
You can’t perform that action at this time.
0 commit comments