From 177ce8ce12db1ea71187da47b72a61d4ed4aa0ef Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Wed, 22 Jan 2025 14:08:55 +0000 Subject: [PATCH] Add explicit type hint for APIObjectSyncMixin.list() --- kr8s/_objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kr8s/_objects.py b/kr8s/_objects.py index 4e80b05..16b833b 100644 --- a/kr8s/_objects.py +++ b/kr8s/_objects.py @@ -7,7 +7,7 @@ import pathlib import re import time -from collections.abc import AsyncGenerator +from collections.abc import AsyncGenerator, Generator from typing import ( Any, BinaryIO, @@ -833,7 +833,7 @@ def adopt(self, child): return run_sync(self.async_adopt)(child) # type: ignore @classmethod - def list(cls, **kwargs): + def list(cls, **kwargs) -> Generator[Self]: # type: ignore yield from run_sync(cls.async_list)(**kwargs)