Skip to content

Commit 88fb3b5

Browse files
committed
Fix pyrefly
Not sure what else to do about an unsafe overlap with `Never`.
1 parent 0403b78 commit 88fb3b5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/svcs/_core.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -996,9 +996,15 @@ def get(self, *svc_types: type) -> object:
996996
rv.append(svc)
997997
continue
998998

999-
if not isinstance(svc, MagicMock) and (
1000-
iscoroutine(svc)
1001-
or isinstance(svc, AbstractAsyncContextManager)
999+
if (
1000+
not isinstance(svc, MagicMock)
1001+
and (
1002+
iscoroutine(svc)
1003+
or isinstance(
1004+
svc,
1005+
AbstractAsyncContextManager, # pyrefly: ignore[unsafe-overlap]
1006+
)
1007+
)
10021008
):
10031009
msg = "Use `aget()` for async factories."
10041010
raise TypeError(msg)

0 commit comments

Comments
 (0)