-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Untyped functions_framework.http #190
Comments
Sounds reasonable.
I attempted to add more types here: |
I wrote the snippet below for another project. It's pulling in the same types used by Flask, so things like the request object and expected return type for function handlers are all properly annotated and play nice with intellisense. Given Flask is already included as a dependency in the functions framework, it might be worth piggybacking on the types defined in from flask.typing import RouteCallable
def http(func: RouteCallable) -> RouteCallable:
"""Decorator that registers http as user function signature type."""
... |
This adds type annotations for the 2 main decorators of the library. Closes: GoogleCloudPlatform#190
This adds type annotations for the 2 main decorators of the library. Closes: GoogleCloudPlatform#190
This adds type annotations for the 2 main decorators of the library. Closes: GoogleCloudPlatform#190
This adds type annotations for the 2 main decorators of the library. Closes: GoogleCloudPlatform#190
* Initial typing of the public API This adds type annotations for the 2 main decorators of the library. Closes: #190 * fix typing * Remove zip_safe flag, as it's not needed anymore. * run black * fix import order --------- Co-authored-by: Gareth <garethgeorge@google.com>
The decorator
functions_framework.http
is untyped, leading toUntyped decorator makes function "main" untyped
errors when using mypy.Would it be possible to add mypy typing? Thanks.
The text was updated successfully, but these errors were encountered: