Skip to content

Commit 5348eed

Browse files
committed
fix: return type get_arff
1 parent b7b81f0 commit 5348eed

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

openml/datasets/dataset.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import numpy as np
2323
import pandas as pd
2424
import scipy.sparse
25+
import typing
2526
import xmltodict
2627

2728
from openml.base import OpenMLBase
@@ -311,6 +312,7 @@ def _download_data(self) -> None:
311312
if self._minio_url is not None:
312313
self.parquet_file = _get_dataset_parquet(self)
313314

315+
@typing.no_type_check
314316
def _parse_data_from_arff(
315317
self, arff_file_path: str
316318
) -> Tuple[Union[pd.DataFrame, scipy.sparse.csr_matrix], List[bool], List[str]]:
@@ -894,7 +896,17 @@ def _to_dict(self) -> "OrderedDict[str, OrderedDict[str, str]]":
894896

895897
return data_container
896898

897-
def _get_arff(self, format: str) -> Dict[str, Union[arff.DENSE, arff.COO]]:
899+
def _get_arff(
900+
self, format: str
901+
) -> Dict[
902+
str,
903+
Union[
904+
str,
905+
List[Union[List[str], Tuple[str, List[str]]]],
906+
List[List[Union[int, float, str]]],
907+
Tuple[List[float], List[int], List[int]],
908+
],
909+
]:
898910
"""Read ARFF file and return decoded arff.
899911
900912
Reads the file referenced in self.data_file.

0 commit comments

Comments
 (0)