Skip to content

Commit

Permalink
revert isinstance list comprehension to tuple.... solution
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasHebing committed Jan 6, 2025
1 parent 173194e commit 9aa7527
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bofire/utils/torch_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,7 @@ def _x_adapt(feat):
continue

if allowed_objectives is not None:
if not any(
[
isinstance(feat.objective, allowed_objective_)
for allowed_objective_ in allowed_objectives
]
):
if not isinstance(feat.objective, tuple(allowed_objectives)):

Check failure on line 537 in bofire/utils/torch_tools.py

View workflow job for this annotation

GitHub Actions / lint

Second argument to "isinstance" must be a class or tuple of classes   TypeVar or generic type with type arguments not allowed (reportGeneralTypeIssues)
continue

callables.append(
Expand Down

0 comments on commit 9aa7527

Please sign in to comment.