Skip to content

Commit ca121c6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8998061 commit ca121c6

File tree

25 files changed

+100
-106
lines changed

25 files changed

+100
-106
lines changed

openml/__init__.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,35 +91,35 @@ def populate_cache(
9191

9292

9393
__all__ = [
94-
"OpenMLDataset",
94+
"OpenMLBenchmarkSuite",
95+
"OpenMLClassificationTask",
96+
"OpenMLClusteringTask",
9597
"OpenMLDataFeature",
96-
"OpenMLRun",
97-
"OpenMLSplit",
98+
"OpenMLDataset",
9899
"OpenMLEvaluation",
99-
"OpenMLSetup",
100-
"OpenMLParameter",
101-
"OpenMLTask",
102-
"OpenMLSupervisedTask",
103-
"OpenMLClusteringTask",
100+
"OpenMLFlow",
104101
"OpenMLLearningCurveTask",
102+
"OpenMLParameter",
105103
"OpenMLRegressionTask",
106-
"OpenMLClassificationTask",
107-
"OpenMLFlow",
104+
"OpenMLRun",
105+
"OpenMLSetup",
106+
"OpenMLSplit",
108107
"OpenMLStudy",
109-
"OpenMLBenchmarkSuite",
108+
"OpenMLSupervisedTask",
109+
"OpenMLTask",
110+
"__version__",
111+
"_api_calls",
112+
"config",
110113
"datasets",
111114
"evaluations",
112115
"exceptions",
113116
"extensions",
114-
"config",
115-
"runs",
116117
"flows",
117-
"tasks",
118+
"runs",
118119
"setups",
119120
"study",
121+
"tasks",
120122
"utils",
121-
"_api_calls",
122-
"__version__",
123123
]
124124

125125
# Load the scikit-learn extension by default

openml/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def stop_using_configuration_for_example(cls) -> None:
254254
global server # noqa: PLW0603
255255
global apikey # noqa: PLW0603
256256

257-
server = cast(str, cls._last_used_server)
258-
apikey = cast(str, cls._last_used_key)
257+
server = cast("str", cls._last_used_server)
258+
apikey = cast("str", cls._last_used_key)
259259
cls._start_last_called = False
260260

261261

@@ -513,10 +513,10 @@ def overwrite_config_context(config: dict[str, Any]) -> Iterator[_Config]:
513513

514514
__all__ = [
515515
"get_cache_directory",
516+
"get_config_as_dict",
516517
"set_root_cache_directory",
517518
"start_using_configuration_for_example",
518519
"stop_using_configuration_for_example",
519-
"get_config_as_dict",
520520
]
521521

522522
_setup()

openml/datasets/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
)
1818

1919
__all__ = [
20+
"OpenMLDataFeature",
21+
"OpenMLDataset",
2022
"attributes_arff_from_df",
2123
"check_datasets_active",
2224
"create_dataset",
25+
"delete_dataset",
26+
"edit_dataset",
27+
"fork_dataset",
2328
"get_dataset",
2429
"get_datasets",
2530
"list_datasets",
26-
"OpenMLDataset",
27-
"OpenMLDataFeature",
28-
"status_update",
2931
"list_qualities",
30-
"edit_dataset",
31-
"fork_dataset",
32-
"delete_dataset",
32+
"status_update",
3333
]

openml/datasets/data_feature.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ def __init__( # noqa: PLR0913
5151
if data_type == "nominal":
5252
if nominal_values is None:
5353
raise TypeError(
54-
"Dataset features require attribute `nominal_values` for nominal "
55-
"feature type.",
54+
"Dataset features require attribute `nominal_values` for nominal feature type.",
5655
)
5756

5857
if not isinstance(nominal_values, list):

openml/datasets/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def _parse_data_from_arff( # noqa: C901, PLR0912, PLR0915
448448
data = self._get_arff(self.format)
449449
except OSError as e:
450450
logger.critical(
451-
f"Please check that the data file {arff_file_path} is " "there and can be read.",
451+
f"Please check that the data file {arff_file_path} is there and can be read.",
452452
)
453453
raise e
454454

openml/datasets/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def list_qualities() -> list[str]:
7272
raise ValueError('Error in return XML, does not contain "oml:data_qualities_list"')
7373

7474
if not isinstance(qualities["oml:data_qualities_list"]["oml:quality"], list):
75-
raise TypeError("Error in return XML, does not contain " '"oml:quality" as a list')
75+
raise TypeError('Error in return XML, does not contain "oml:quality" as a list')
7676

7777
return qualities["oml:data_qualities_list"]["oml:quality"]
7878

@@ -177,7 +177,7 @@ def list_datasets(
177177
"""
178178
if output_format not in ["dataframe", "dict"]:
179179
raise ValueError(
180-
"Invalid output format selected. " "Only 'dict' or 'dataframe' applicable.",
180+
"Invalid output format selected. Only 'dict' or 'dataframe' applicable.",
181181
)
182182

183183
# TODO: [0.15]

openml/evaluations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
__all__ = [
77
"OpenMLEvaluation",
8-
"list_evaluations",
98
"list_evaluation_measures",
9+
"list_evaluations",
1010
"list_evaluations_setups",
1111
]

openml/evaluations/evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __repr__(self) -> str:
103103
"Run ID",
104104
"OpenML Run URL",
105105
"Task ID",
106-
"OpenML Task URL" "Flow ID",
106+
"OpenML Task URLFlow ID",
107107
"OpenML Flow URL",
108108
"Setup ID",
109109
"Data ID",

openml/evaluations/functions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def __list_evaluations(
234234
# Minimalistic check if the XML is useful
235235
if "oml:evaluations" not in evals_dict:
236236
raise ValueError(
237-
"Error in return XML, does not contain " f'"oml:evaluations": {evals_dict!s}',
237+
f'Error in return XML, does not contain "oml:evaluations": {evals_dict!s}',
238238
)
239239

240240
assert isinstance(evals_dict["oml:evaluations"]["oml:evaluation"], list), type(
@@ -321,9 +321,9 @@ def list_evaluation_measures() -> list[str]:
321321
qualities = xmltodict.parse(xml_string, force_list=("oml:measures"))
322322
# Minimalistic check if the XML is useful
323323
if "oml:evaluation_measures" not in qualities:
324-
raise ValueError("Error in return XML, does not contain " '"oml:evaluation_measures"')
324+
raise ValueError('Error in return XML, does not contain "oml:evaluation_measures"')
325325
if not isinstance(qualities["oml:evaluation_measures"]["oml:measures"][0]["oml:measure"], list):
326-
raise TypeError("Error in return XML, does not contain " '"oml:measure" as a list')
326+
raise TypeError('Error in return XML, does not contain "oml:measure" as a list')
327327
return qualities["oml:evaluation_measures"]["oml:measures"][0]["oml:measure"]
328328

329329

@@ -343,13 +343,13 @@ def list_estimation_procedures() -> list[str]:
343343

344344
# Minimalistic check if the XML is useful
345345
if "oml:estimationprocedures" not in api_results:
346-
raise ValueError("Error in return XML, does not contain " '"oml:estimationprocedures"')
346+
raise ValueError('Error in return XML, does not contain "oml:estimationprocedures"')
347347
if "oml:estimationprocedure" not in api_results["oml:estimationprocedures"]:
348-
raise ValueError("Error in return XML, does not contain " '"oml:estimationprocedure"')
348+
raise ValueError('Error in return XML, does not contain "oml:estimationprocedure"')
349349

350350
if not isinstance(api_results["oml:estimationprocedures"]["oml:estimationprocedure"], list):
351351
raise TypeError(
352-
"Error in return XML, does not contain " '"oml:estimationprocedure" as a list',
352+
'Error in return XML, does not contain "oml:estimationprocedure" as a list',
353353
)
354354

355355
return [
@@ -415,7 +415,7 @@ def list_evaluations_setups(
415415
"""
416416
if parameters_in_separate_columns and (flows is None or len(flows) != 1):
417417
raise ValueError(
418-
"Can set parameters_in_separate_columns to true " "only for single flow_id",
418+
"Can set parameters_in_separate_columns to true only for single flow_id",
419419
)
420420

421421
# List evaluations

openml/extensions/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__all__ = [
1212
"Extension",
13-
"register_extension",
14-
"get_extension_by_model",
1513
"get_extension_by_flow",
14+
"get_extension_by_model",
15+
"register_extension",
1616
]

0 commit comments

Comments
 (0)