This commit is contained in:
2025-05-22 20:25:38 +02:00
parent 09f6750c2b
commit ce03fbf12f
529 changed files with 3353 additions and 3312 deletions

View File

@@ -58,9 +58,7 @@ class ReversibleProxy(Generic[_PT]):
)
proxy_ref = weakref.ref(
self,
functools.partial( # type: ignore
ReversibleProxy._target_gced, target_ref
),
functools.partial(ReversibleProxy._target_gced, target_ref),
)
ReversibleProxy._proxy_objects[target_ref] = proxy_ref
@@ -70,7 +68,7 @@ class ReversibleProxy(Generic[_PT]):
def _target_gced(
cls,
ref: weakref.ref[_PT],
proxy_ref: Optional[weakref.ref[Self]] = None,
proxy_ref: Optional[weakref.ref[Self]] = None, # noqa: U100
) -> None:
cls._proxy_objects.pop(ref, None)
@@ -124,7 +122,7 @@ class StartableContext(Awaitable[_T_co], abc.ABC):
return self.start().__await__()
async def __aenter__(self) -> _T_co:
return await self.start(is_ctxmanager=True) # type: ignore
return await self.start(is_ctxmanager=True)
@abc.abstractmethod
async def __aexit__(