We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f924b32 commit 541b0f2Copy full SHA for 541b0f2
1 file changed
openml/_api/clients/http.py
@@ -9,7 +9,7 @@
9
import xml
10
from collections.abc import Callable, Mapping
11
from pathlib import Path
12
-from typing import Any
+from typing import Any, cast
13
from urllib.parse import urlencode, urljoin, urlparse
14
15
import requests
@@ -647,7 +647,9 @@ def request( # noqa: PLR0913, C901
647
delay = self.retry_func(retry_counter)
648
time.sleep(delay)
649
650
- assert response is not None
+ # response is guaranteed to be not `None`
651
+ # otherwise an exception would have been raised before
652
+ response = cast("Response", response)
653
654
if use_cache and self.cache is not None:
655
cache_key = self.cache.get_key(url, params)
0 commit comments