commit
93311d51d6
@ -170,7 +170,7 @@ class CachedSlotProperty(Generic[T, T_co]):
|
||||
|
||||
class classproperty(Generic[T_co]):
|
||||
def __init__(self, fget: Callable[[Any], T_co]) -> None:
|
||||
self.fget = fget
|
||||
self.fget: Callable[[Any], T_co] = fget
|
||||
|
||||
def __get__(self, instance: Optional[Any], owner: Type[Any]) -> T_co:
|
||||
return self.fget(owner)
|
||||
@ -207,7 +207,7 @@ class SequenceProxy(Generic[T_co], collections.abc.Sequence):
|
||||
def __reversed__(self) -> Iterator[T_co]:
|
||||
return reversed(self.__proxied)
|
||||
|
||||
def index(self, value: Any, *args, **kwargs) -> int:
|
||||
def index(self, value: Any, *args: Any, **kwargs: Any) -> int:
|
||||
return self.__proxied.index(value, *args, **kwargs)
|
||||
|
||||
def count(self, value: Any) -> int:
|
||||
@ -507,7 +507,7 @@ def _parse_ratelimit_header(request: Any, *, use_clock: bool = False) -> float:
|
||||
return float(reset_after)
|
||||
|
||||
|
||||
async def maybe_coroutine(f, *args, **kwargs):
|
||||
async def maybe_coroutine(f: Callable[..., Any], *args: Any, **kwargs: Any) -> Callable[..., Any]:
|
||||
value = f(*args, **kwargs)
|
||||
if _isawaitable(value):
|
||||
return await value
|
||||
@ -515,7 +515,7 @@ async def maybe_coroutine(f, *args, **kwargs):
|
||||
return value
|
||||
|
||||
|
||||
async def async_all(gen, *, check=_isawaitable):
|
||||
async def async_all(gen, *, check=_isawaitable) -> bool:
|
||||
for elem in gen:
|
||||
if check(elem):
|
||||
elem = await elem
|
||||
|
Loading…
x
Reference in New Issue
Block a user