Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import contextlib
import json
import tempfile
from collections.abc import AsyncGenerator
from functools import cached_property
from time import sleep
from typing import TYPE_CHECKING, Any, Protocol
Expand Down Expand Up @@ -874,7 +875,7 @@ async def _get_field(self, field_name):
return extras.get(prefixed_name)

@contextlib.asynccontextmanager
async def get_conn(self) -> async_client.ApiClient:
async def get_conn(self) -> AsyncGenerator[async_client.ApiClient, None]:
kube_client = None
try:
kube_client = await self._load_config() or async_client.ApiClient()
Expand Down Expand Up @@ -951,8 +952,8 @@ async def read_logs(
timestamps=True,
since_seconds=since_seconds,
)
logs = logs.splitlines()
return logs
logs_list: list[str] = logs.splitlines()
return logs_list
except HTTPError as e:
raise KubernetesApiError from e

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import contextlib
import json
import time
from collections.abc import Sequence
from collections.abc import AsyncGenerator, Sequence
from typing import TYPE_CHECKING, Any

from google.api_core.exceptions import NotFound
Expand Down Expand Up @@ -498,7 +498,7 @@ def __init__(
)

@contextlib.asynccontextmanager
async def get_conn(self) -> async_client.ApiClient:
async def get_conn(self) -> AsyncGenerator[async_client.ApiClient, None]:
kube_client = None
try:
kube_client = await self._load_config()
Expand Down
Loading