Skip to content

Commit 614411f

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

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

openml/_api/resources/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
__all__ = [
66
"DatasetsV1",
77
"DatasetsV2",
8-
"TasksV1",
9-
"TasksV2",
108
"FlowsV1",
119
"FlowsV2",
10+
"TasksV1",
11+
"TasksV2",
1212
]

openml/flows/functions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,10 @@ def _get_flow_description(flow_id: int) -> OpenMLFlow:
119119
try:
120120
return _get_cached_flow(flow_id)
121121
except OpenMLCacheException:
122-
from openml._api import api_context
123-
124122
xml_file = (
125123
openml.utils._create_cache_directory_for_id(FLOWS_CACHE_DIR_NAME, flow_id) / "flow.xml"
126124
)
127-
flow_xml = openml._api_calls._perform_api_call(f"flow/{flow_id}", request_method="get")
125+
openml._api_calls._perform_api_call(f"flow/{flow_id}", request_method="get")
128126

129127
if isinstance(result, tuple):
130128
flow, response = result

openml/tasks/functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import openml._api_calls
1414
import openml.utils
15-
from openml._api import api_context
1615
from openml.datasets import get_dataset
1716
from openml.exceptions import OpenMLCacheException
1817

@@ -445,7 +444,7 @@ def _get_task_description(task_id: int) -> OpenMLTask:
445444
except OpenMLCacheException:
446445
_cache_dir = openml.utils._create_cache_directory_for_id(TASKS_CACHE_DIR_NAME, task_id)
447446
xml_file = _cache_dir / "task.xml"
448-
task_xml = openml._api_calls._perform_api_call(f"task/{task_id}", "get")
447+
openml._api_calls._perform_api_call(f"task/{task_id}", "get")
449448

450449
if isinstance(result, tuple):
451450
task, response = result

0 commit comments

Comments
 (0)