Skip to content

Commit f77a816

Browse files
authored
Fix mypy 1.11 warnings (#809)
Mypy got updated to v 1.11 recently We need these mypy fixes to make other PRs pass the CI tests
1 parent b889225 commit f77a816

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

mlos_core/mlos_core/tests/optimizers/optimizer_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def objective(x: pd.Series) -> pd.DataFrame:
157157
def test_concrete_optimizer_type(optimizer_type: OptimizerType) -> None:
158158
"""Test that all optimizer types are listed in the ConcreteOptimizer constraints."""
159159
# pylint: disable=no-member
160-
assert optimizer_type.value in ConcreteOptimizer.__constraints__ # type: ignore[attr-defined]
160+
assert optimizer_type.value in ConcreteOptimizer.__constraints__
161161

162162

163163
@pytest.mark.parametrize(

mlos_core/mlos_core/tests/spaces/adapters/space_adapter_factory_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
def test_concrete_optimizer_type(space_adapter_type: SpaceAdapterType) -> None:
3333
"""Test that all optimizer types are listed in the ConcreteOptimizer constraints."""
3434
# pylint: disable=no-member
35-
assert (
36-
space_adapter_type.value
37-
in ConcreteSpaceAdapter.__constraints__ # type: ignore[attr-defined]
38-
)
35+
assert space_adapter_type.value in ConcreteSpaceAdapter.__constraints__
3936

4037

4138
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)