Update type check in get_user_function
to accept Callable instead of only types.FunctionType
#317
Labels
get_user_function
to accept Callable instead of only types.FunctionType
#317
Uh oh!
There was an error while loading. Please reload this page.
I am making an adapter for running ASGI applications in GCP Cloud Function. (Repo)
Simply, I want to run my ASGI application (such as FastAPI or Django) in Cloud Function.
My adapter(
Vellox
) works like this:I confirmed that my adapter (vellox) works "hello world" example properly. But
functions_framework
throw error when handler is nottypes.FunctionType
. In abvoe code, handler is instance ofVellox
and also it is callable.The code below is the part that is problematic.
Instead of forcing the function type to be function, I suggest changing it to
Callable
, which has a slightly wider scope.The text was updated successfully, but these errors were encountered: