@@ -445,7 +445,7 @@ def scoped[**P, T](
445445 mode : Mode | ModeStr = Mode .get_default (),
446446 ) -> Any :
447447 def decorator (
448- wp : Callable [P , T ]
448+ wrapped : Callable [P , T ]
449449 | Callable [P , Awaitable [T ]]
450450 | Callable [P , Iterator [T ]]
451451 | Callable [P , AsyncIterator [T ]],
@@ -463,19 +463,19 @@ def decorator(
463463 | Callable [P , AsyncContextManager [T ]]
464464 )
465465
466- if isasyncgenfunction (wp ):
467- hint = get_yield_hint (wp )
466+ if isasyncgenfunction (wrapped ):
467+ hint = get_yield_hint (wrapped )
468468 injectable_class = AsyncCMScopedInjectable
469- wrapper = asynccontextmanager (wp )
469+ wrapper = asynccontextmanager (wrapped )
470470
471- elif isgeneratorfunction (wp ):
472- hint = get_yield_hint (wp )
471+ elif isgeneratorfunction (wrapped ):
472+ hint = get_yield_hint (wrapped )
473473 injectable_class = CMScopedInjectable
474- wrapper = contextmanager (wp )
474+ wrapper = contextmanager (wrapped )
475475
476476 else :
477477 injectable_class = SimpleScopedInjectable
478- hint = wrapper = wp # type: ignore[assignment]
478+ hint = wrapper = wrapped # type: ignore[assignment]
479479
480480 hints = on if hint is None else (hint , on )
481481 self .injectable (
@@ -486,7 +486,7 @@ def decorator(
486486 on = hints ,
487487 mode = mode ,
488488 )
489- return wp
489+ return wrapped
490490
491491 return decorator
492492
0 commit comments