Skip to content

Commit 6777423

Browse files
simplifying if-else
Co-authored-by: Auguste Baum <[email protected]>
1 parent 34ca3e4 commit 6777423

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

skore/src/skore/utils/_accessor.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ def check(accessor: Any) -> bool:
6363
if hasattr(estimator.regressor_, "coef_"):
6464
return True
6565
except AttributeError as msg:
66-
if "object has no attribute 'regressor_'" in str(msg):
67-
pass
68-
else:
66+
if "object has no attribute 'regressor_'" not in str(msg):
6967
raise
7068
raise AttributeError(
7169
f"Estimator {parent_estimator} is not a supported estimator by "

0 commit comments

Comments
 (0)