Return types for some flask methods (#3888)

This commit is contained in:
Katelyn Gigante
2020-04-01 00:44:47 +10:00
committed by GitHub
parent 410174d90e
commit bf502024da
2 changed files with 5 additions and 4 deletions

View File

@@ -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): ...

View File

@@ -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): ...