Skip to content

Commit

Permalink
fix: __contains__ for configspace
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiebergman committed Aug 1, 2023
1 parent 93abc5b commit ed74a51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ConfigSpace/configuration_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,9 @@ def __getitem__(self, key: str) -> Hyperparameter:

return hp

def __contains__(self, key: str) -> bool:
return key in self._hyperparameters

def __repr__(self) -> str:
retval = io.StringIO()
retval.write("Configuration space object:\n Hyperparameters:\n")
Expand Down

0 comments on commit ed74a51

Please sign in to comment.