We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 853f5a0 commit c5fbd72Copy full SHA for c5fbd72
injection/_core/asfunction.py
@@ -2,7 +2,6 @@
2
from collections.abc import Callable
3
from functools import wraps
4
from inspect import iscoroutinefunction
5
-from types import MethodType
6
from typing import Any, Protocol, runtime_checkable
7
8
from injection._core.common.asynchronous import Caller
@@ -30,7 +29,7 @@ def asfunction[**P, T](
30
29
module = module or mod()
31
32
def decorator(wp: AsFunctionWrappedType[P, T]) -> Callable[P, T]:
33
- fake_method = MethodType(wp.call, NotImplemented)
+ fake_method = wp.call.__get__(NotImplemented)
34
factory: Caller[..., AsFunctionCallable[P, T]] = module.make_injected_function(
35
wp,
36
threadsafe=threadsafe,
0 commit comments