Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions injection/_core/asfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from collections.abc import Callable
from functools import wraps
from inspect import iscoroutinefunction
from types import MethodType
from typing import Any, Protocol, runtime_checkable

from injection._core.common.asynchronous import Caller
Expand Down Expand Up @@ -30,7 +29,7 @@ def asfunction[**P, T](
module = module or mod()

def decorator(wp: AsFunctionWrappedType[P, T]) -> Callable[P, T]:
fake_method = MethodType(wp.call, NotImplemented)
fake_method = wp.call.__get__(NotImplemented)
factory: Caller[..., AsFunctionCallable[P, T]] = module.make_injected_function(
wp,
threadsafe=threadsafe,
Expand Down