Skip to content

Commit 5cb74b8

Browse files
author
remimd
committed
typo
1 parent c6a50df commit 5cb74b8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

injection/_core/asfunction.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def asfunction[**P, T](
1717
module = module or mod()
1818

1919
def decorator(wp: type[Callable[P, T]]) -> Callable[P, T]:
20-
get = wp.__call__.__get__
21-
method = get(NotImplemented)
20+
get_method = wp.__call__.__get__
21+
method = get_method(NotImplemented)
2222
factory: Caller[..., Callable[P, T]] = module.make_injected_function(
2323
wp,
2424
threadsafe=threadsafe,
@@ -31,14 +31,14 @@ def decorator(wp: type[Callable[P, T]]) -> Callable[P, T]:
3131
@wraps(method)
3232
async def wrapper(*args: P.args, **kwargs: P.kwargs) -> Any:
3333
self = await factory.acall()
34-
return await get(self)(*args, **kwargs)
34+
return await get_method(self)(*args, **kwargs)
3535

3636
else:
3737

3838
@wraps(method)
3939
def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
4040
self = factory.call()
41-
return get(self)(*args, **kwargs)
41+
return get_method(self)(*args, **kwargs)
4242

4343
wrapper.__name__ = wp.__name__
4444
wrapper.__qualname__ = wp.__qualname__

0 commit comments

Comments
 (0)