Skip to content

Commit 12384a1

Browse files
MNT silence a LGTM alert (scikit-learn#12633)
1 parent 775bef3 commit 12384a1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sklearn/datasets/openml.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from warnings import warn
77
from contextlib import closing
88
from functools import wraps
9-
import warnings
109

1110
try:
1211
# Python 3+
@@ -53,9 +52,7 @@ def wrapper():
5352
except HTTPError:
5453
raise
5554
except Exception:
56-
warnings.warn(
57-
"Invalid cache, redownloading file",
58-
RuntimeWarning)
55+
warn("Invalid cache, redownloading file", RuntimeWarning)
5956
local_path = _get_local_path(openml_path, data_home)
6057
if os.path.exists(local_path):
6158
os.unlink(local_path)

0 commit comments

Comments
 (0)