Skip to content

Commit

Permalink
make mypy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias committed Jun 12, 2024
1 parent cd592bd commit fd5f77f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions plugins/gcp/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions plugins/gcp/test/random_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit fd5f77f

Please sign in to comment.