From 7b7f8f4c3ae7e9cfb93837e27a43922154365d92 Mon Sep 17 00:00:00 2001 From: Brian Kroth Date: Fri, 22 Nov 2024 16:44:47 +0000 Subject: [PATCH] Revert "alternative way of ignoring things" This reverts commit deaa62ea5b070b7257f5827554fa9f4e39eba5ec. --- .../mlos_bench/environments/local/local_fileshare_env.py | 2 +- .../mlos_bench/tests/services/remote/ssh/fixtures.py | 2 +- .../tests/services/remote/ssh/test_ssh_fileshare.py | 4 +--- mlos_bench/mlos_bench/tests/storage/sql/fixtures.py | 6 +++--- mlos_bench/mlos_bench/tunables/tunable_groups.py | 8 +------- 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/mlos_bench/mlos_bench/environments/local/local_fileshare_env.py b/mlos_bench/mlos_bench/environments/local/local_fileshare_env.py index 4e83d898915..70281b5a036 100644 --- a/mlos_bench/mlos_bench/environments/local/local_fileshare_env.py +++ b/mlos_bench/mlos_bench/environments/local/local_fileshare_env.py @@ -90,7 +90,7 @@ def _template_from_to(self, config_key: str) -> List[Tuple[Template, Template]]: def _expand( from_to: Iterable[Tuple[Template, Template]], params: Mapping[str, TunableValue], - ) -> Generator[Tuple[str, str], None, None]: # pylint: disable=unnecessary-default-type-args + ) -> Generator[Tuple[str, str], None, None]: """ Substitute $var parameters in from/to path templates. diff --git a/mlos_bench/mlos_bench/tests/services/remote/ssh/fixtures.py b/mlos_bench/mlos_bench/tests/services/remote/ssh/fixtures.py index 1169bef41d2..f4042cf62f9 100644 --- a/mlos_bench/mlos_bench/tests/services/remote/ssh/fixtures.py +++ b/mlos_bench/mlos_bench/tests/services/remote/ssh/fixtures.py @@ -51,7 +51,7 @@ def ssh_test_server( ssh_test_server_hostname: str, docker_compose_project_name: str, locked_docker_services: DockerServices, -) -> Generator[SshTestServerInfo, None, None]: # pylint: disable=unnecessary-default-type-args +) -> Generator[SshTestServerInfo, None, None]: """ Fixture for getting the ssh test server services setup via docker-compose using pytest-docker. diff --git a/mlos_bench/mlos_bench/tests/services/remote/ssh/test_ssh_fileshare.py b/mlos_bench/mlos_bench/tests/services/remote/ssh/test_ssh_fileshare.py index 904af700638..c0bb730a1e1 100644 --- a/mlos_bench/mlos_bench/tests/services/remote/ssh/test_ssh_fileshare.py +++ b/mlos_bench/mlos_bench/tests/services/remote/ssh/test_ssh_fileshare.py @@ -22,9 +22,7 @@ @contextmanager -def closeable_temp_file( - **kwargs: Any, -) -> Generator[_TemporaryFileWrapper, None, None]: # pylint: disable=unnecessary-default-type-args +def closeable_temp_file(**kwargs: Any) -> Generator[_TemporaryFileWrapper, None, None]: """ Provides a context manager for a temporary file that can be closed and still unlinked. diff --git a/mlos_bench/mlos_bench/tests/storage/sql/fixtures.py b/mlos_bench/mlos_bench/tests/storage/sql/fixtures.py index bbdeccece96..4e92d9ab9d1 100644 --- a/mlos_bench/mlos_bench/tests/storage/sql/fixtures.py +++ b/mlos_bench/mlos_bench/tests/storage/sql/fixtures.py @@ -38,7 +38,7 @@ def storage() -> SqlStorage: def exp_storage( storage: SqlStorage, tunable_groups: TunableGroups, -) -> Generator[SqlStorage.Experiment, None, None]: # pylint: disable=unnecessary-default-type-args +) -> Generator[SqlStorage.Experiment, None, None]: """ Test fixture for Experiment using in-memory SQLite3 storage. @@ -60,7 +60,7 @@ def exp_storage( @pytest.fixture def exp_no_tunables_storage( storage: SqlStorage, -) -> Generator[SqlStorage.Experiment, None, None]: # pylint: disable=unnecessary-default-type-args +) -> Generator[SqlStorage.Experiment, None, None]: """ Test fixture for Experiment using in-memory SQLite3 storage. @@ -84,7 +84,7 @@ def exp_no_tunables_storage( def mixed_numerics_exp_storage( storage: SqlStorage, mixed_numerics_tunable_groups: TunableGroups, -) -> Generator[SqlStorage.Experiment, None, None]: # pylint: disable=unnecessary-default-type-args +) -> Generator[SqlStorage.Experiment, None, None]: """ Test fixture for an Experiment with mixed numerics tunables using in-memory SQLite3 storage. diff --git a/mlos_bench/mlos_bench/tunables/tunable_groups.py b/mlos_bench/mlos_bench/tunables/tunable_groups.py index 525ee58c89e..99772acfd05 100644 --- a/mlos_bench/mlos_bench/tunables/tunable_groups.py +++ b/mlos_bench/mlos_bench/tunables/tunable_groups.py @@ -172,13 +172,7 @@ def __setitem__( self._index[name][name] = value return self._index[name][name] - def __iter__( - self, - ) -> Generator[ # pylint: disable=unnecessary-default-type-args - Tuple[Tunable, CovariantTunableGroup], - None, - None, - ]: + def __iter__(self) -> Generator[Tuple[Tunable, CovariantTunableGroup], None, None]: """ An iterator over all tunables in the group.