mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Return types for some flask methods (#3888)
This commit is contained in:
2
third_party/2and3/flask/app.pyi
vendored
2
third_party/2and3/flask/app.pyi
vendored
@@ -174,7 +174,7 @@ class Flask(_PackageBoundObject):
|
||||
def process_response(self, response: Any): ...
|
||||
def do_teardown_request(self, exc: Any = ...) -> None: ...
|
||||
def do_teardown_appcontext(self, exc: Any = ...) -> None: ...
|
||||
def app_context(self): ...
|
||||
def app_context(self) -> AppContext: ...
|
||||
def request_context(self, environ: Any): ...
|
||||
def test_request_context(self, *args: Any, **kwargs: Any) -> ContextManager[RequestContext]: ...
|
||||
def wsgi_app(self, environ: Any, start_response: Any): ...
|
||||
|
||||
7
third_party/2and3/flask/helpers.pyi
vendored
7
third_party/2and3/flask/helpers.pyi
vendored
@@ -4,18 +4,19 @@
|
||||
|
||||
from .globals import _app_ctx_stack, _request_ctx_stack, current_app, request, session
|
||||
from .signals import message_flashed
|
||||
from .wrappers import Response
|
||||
from typing import Any, Optional
|
||||
|
||||
def get_env(): ...
|
||||
def get_debug_flag(): ...
|
||||
def get_load_dotenv(default: bool = ...): ...
|
||||
def stream_with_context(generator_or_function: Any): ...
|
||||
def make_response(*args: Any): ...
|
||||
def url_for(endpoint: Any, **values: Any): ...
|
||||
def make_response(*args: Any) -> Response: ...
|
||||
def url_for(endpoint: str, **values: Any) -> str: ...
|
||||
def get_template_attribute(template_name: Any, attribute: Any): ...
|
||||
def flash(message: Any, category: str = ...) -> None: ...
|
||||
def get_flashed_messages(with_categories: bool = ..., category_filter: Any = ...): ...
|
||||
def send_file(filename_or_fp: Any, mimetype: Optional[Any] = ..., as_attachment: bool = ..., attachment_filename: Optional[Any] = ..., add_etags: bool = ..., cache_timeout: Optional[Any] = ..., conditional: bool = ..., last_modified: Optional[Any] = ...): ...
|
||||
def send_file(filename_or_fp: Any, mimetype: Optional[Any] = ..., as_attachment: bool = ..., attachment_filename: Optional[Any] = ..., add_etags: bool = ..., cache_timeout: Optional[Any] = ..., conditional: bool = ..., last_modified: Optional[Any] = ...) -> Response: ...
|
||||
def safe_join(directory: Any, *pathnames: Any): ...
|
||||
def send_from_directory(directory: Any, filename: Any, **options: Any): ...
|
||||
def get_root_path(import_name: Any): ...
|
||||
|
||||
Reference in New Issue
Block a user