Big diff: use lower-case list and dict (#5888)

This commit is contained in:
Akuli
2021-08-08 19:26:35 +03:00
committed by GitHub
parent 11f54c3407
commit ce11072dbe
325 changed files with 2196 additions and 2334 deletions

View File

@@ -71,11 +71,11 @@ class Flask(_PackageBoundObject):
view_functions: Any = ...
error_handler_spec: Any = ...
url_build_error_handlers: Any = ...
before_request_funcs: Dict[str | None, List[Callable[[], Any]]] = ...
before_first_request_funcs: List[Callable[[], None]] = ...
after_request_funcs: Dict[str | None, List[Callable[[Response], Response]]] = ...
teardown_request_funcs: Dict[str | None, List[Callable[[Exception | None], Any]]] = ...
teardown_appcontext_funcs: List[Callable[[Exception | None], Any]] = ...
before_request_funcs: dict[str | None, list[Callable[[], Any]]] = ...
before_first_request_funcs: list[Callable[[], None]] = ...
after_request_funcs: dict[str | None, list[Callable[[Response], Response]]] = ...
teardown_request_funcs: dict[str | None, list[Callable[[Exception | None], Any]]] = ...
teardown_appcontext_funcs: list[Callable[[Exception | None], Any]] = ...
url_value_preprocessors: Any = ...
url_default_functions: Any = ...
template_context_processors: Any = ...

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict
from typing import Any
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Rule
@@ -14,7 +14,7 @@ class JSONMixin:
class Request(RequestBase, JSONMixin):
url_rule: Rule | None = ...
view_args: Dict[str, Any] = ...
view_args: dict[str, Any] = ...
routing_exception: HTTPException | None = ...
# Request is making the max_content_length readonly, where it was not the
# case in its supertype.