From fd5f77f531a46420b4d1495f7adf8d62daa51022 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Wed, 12 Jun 2024 10:22:45 +0200 Subject: [PATCH] make mypy happy --- plugins/gcp/test/conftest.py | 5 ++--- plugins/gcp/test/random_client.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/gcp/test/conftest.py b/plugins/gcp/test/conftest.py index ffc95c6a54..15a0d333cc 100644 --- a/plugins/gcp/test/conftest.py +++ b/plugins/gcp/test/conftest.py @@ -29,9 +29,8 @@ def random_builder() -> Iterator[GraphBuilder]: feedback = CoreFeedback("test", "test", "test", Queue()) project = GcpProject(id="test") project_global_region = GcpRegion.fallback_global_region(project) - builder = GraphBuilder( - Graph(), Cloud(id="gcp"), project, AnonymousCredentials(), queue, feedback, project_global_region - ) + credentials = AnonymousCredentials() # type: ignore + builder = GraphBuilder(Graph(), Cloud(id="gcp"), project, credentials, queue, feedback, project_global_region) builder.add_node(project_global_region, {}) # add predefined regions and zones for predefined in random_predefined: diff --git a/plugins/gcp/test/random_client.py b/plugins/gcp/test/random_client.py index 625d329a1c..a05d2936d3 100644 --- a/plugins/gcp/test/random_client.py +++ b/plugins/gcp/test/random_client.py @@ -193,7 +193,7 @@ def build_random_data_client(service: str, version: str, *args: Any, **kwargs: A """ This is the random data client discovery function (replaces discovery.build in tests). """ - real_client = discovery.build(service, version, credentials=AnonymousCredentials()) + real_client = discovery.build(service, version, credentials=AnonymousCredentials()) # type: ignore root = real_client._rootDesc return RandomDataClient(service, version, root) @@ -237,7 +237,7 @@ def roundtrip( def create_node_for( clazz: Type[GcpResourceType], spec: GcpApiSpec, adapt: Callable[[Json], Json] ) -> Tuple[Json, GcpResourceType]: - client = GcpClient(AnonymousCredentials()) + client = GcpClient(AnonymousCredentials()) # type: ignore result = client.list(api_spec=spec) assert len(result) > 0 raw = adapt(result[0])