File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 2525 isgeneratorfunction ,
2626)
2727from types import TracebackType
28- from typing import Any , TypeVar , no_type_check , overload
28+ from typing import Any , TypeVar , overload
2929from unittest .mock import MagicMock
3030
3131import attrs
@@ -469,7 +469,6 @@ def close(self) -> None:
469469 self ._services .clear ()
470470 self ._on_close .clear ()
471471
472- @no_type_check # both ty and pyrefly choke on this method
473472 async def aclose (self ) -> None :
474473 """
475474 Clear registrations and run all *on_registry_close* callbacks.
@@ -482,15 +481,15 @@ async def aclose(self) -> None:
482481 for rs , oc in reversed (self ._on_close ):
483482 try :
484483 if iscoroutinefunction (oc ):
485- oc = oc () # noqa: PLW2901
484+ oc = oc () # noqa: PLW2901 # ty: ignore[call-non-callable] # pyrefly: ignore[bad-assignment]
486485
487486 if isawaitable (oc ):
488487 log .debug ("async closing %r" , rs .name )
489488 await oc
490489 log .debug ("async closed %r" , rs .name )
491490 else :
492491 log .debug ("closing %r" , rs .name )
493- oc ()
492+ oc () # pyrefly: ignore[unused-coroutine]
494493 log .debug ("closed %r" , rs .name )
495494 except Exception : # noqa: BLE001, PERF203
496495 log .warning (
You can’t perform that action at this time.
0 commit comments