Voice et bot modif

This commit is contained in:
pi 2026-06-16 17:09:34 +00:00
parent 189d56026b
commit 7333a22bcd
10774 changed files with 634644 additions and 933308 deletions

View file

@ -4,7 +4,7 @@ from typing import TYPE_CHECKING
_PUBLIC_API = ("cached_property", "under_cached_property")
__version__ = "0.4.1"
__version__ = "0.5.2"
__all__ = ()
# Imports have moved to `propcache.api` in 0.2.0+.

View file

@ -1,9 +1,11 @@
"""Various helper functions."""
from __future__ import annotations
import sys
from collections.abc import Mapping
from collections.abc import Callable, Mapping
from functools import cached_property
from typing import Any, Callable, Generic, Optional, Protocol, TypeVar, Union, overload
from typing import Any, Generic, Protocol, TypeVar, overload
__all__ = ("under_cached_property", "cached_property")
@ -39,16 +41,16 @@ class under_cached_property(Generic[_T]):
self.name = wrapped.__name__
@overload
def __get__(self, inst: None, owner: Optional[type[object]] = None) -> Self: ...
def __get__(self, inst: None, owner: type[object] | None = None) -> Self: ...
@overload
def __get__(
self, inst: _CacheImpl[Any], owner: Optional[type[object]] = None
self, inst: _CacheImpl[Any], owner: type[object] | None = None
) -> _T: ...
def __get__(
self, inst: Optional[_CacheImpl[Any]], owner: Optional[type[object]] = None
) -> Union[_T, Self]:
self, inst: _CacheImpl[Any] | None, owner: type[object] | None = None
) -> _T | Self:
if inst is None:
return self
try: