update requirements

This commit is contained in:
David Lord 2022-11-25 07:39:54 -08:00
parent 9f99425aaf
commit d178653b5f
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
12 changed files with 39 additions and 46 deletions

View file

@ -384,7 +384,7 @@ class Flask(Scaffold):
_json_decoder: t.Union[t.Type[json.JSONDecoder], None] = None
@property # type: ignore[override]
def json_encoder(self) -> t.Type[json.JSONEncoder]: # type: ignore[override]
def json_encoder(self) -> t.Type[json.JSONEncoder]:
"""The JSON encoder class to use. Defaults to
:class:`~flask.json.JSONEncoder`.
@ -423,7 +423,7 @@ class Flask(Scaffold):
self._json_encoder = value
@property # type: ignore[override]
def json_decoder(self) -> t.Type[json.JSONDecoder]: # type: ignore[override]
def json_decoder(self) -> t.Type[json.JSONDecoder]:
"""The JSON decoder class to use. Defaults to
:class:`~flask.json.JSONDecoder`.

View file

@ -176,8 +176,8 @@ class Blueprint(Scaffold):
_json_encoder: t.Union[t.Type[json.JSONEncoder], None] = None
_json_decoder: t.Union[t.Type[json.JSONDecoder], None] = None
@property # type: ignore[override]
def json_encoder( # type: ignore[override]
@property
def json_encoder(
self,
) -> t.Union[t.Type[json.JSONEncoder], None]:
"""Blueprint-local JSON encoder class to use. Set to ``None`` to use the app's.
@ -210,8 +210,8 @@ class Blueprint(Scaffold):
)
self._json_encoder = value
@property # type: ignore[override]
def json_decoder( # type: ignore[override]
@property
def json_decoder(
self,
) -> t.Union[t.Type[json.JSONDecoder], None]:
"""Blueprint-local JSON decoder class to use. Set to ``None`` to use the app's.

View file

@ -307,7 +307,7 @@ class RequestContext:
self.app = app
if request is None:
request = app.request_class(environ)
request.json_module = app.json # type: ignore[misc]
request.json_module = app.json
self.request: Request = request
self.url_adapter = None
try:

View file

@ -149,7 +149,7 @@ def stream_with_context(
yield from gen
finally:
if hasattr(gen, "close"):
gen.close() # type: ignore
gen.close()
# The trick is to start the generator. Then the code execution runs until
# the first dummy None is yielded at which point the context was already
@ -287,7 +287,7 @@ def redirect(
return _wz_redirect(location, code=code, Response=Response)
def abort( # type: ignore[misc]
def abort(
code: t.Union[int, "BaseResponse"], *args: t.Any, **kwargs: t.Any
) -> "te.NoReturn":
"""Raise an :exc:`~werkzeug.exceptions.HTTPException` for the given
@ -617,7 +617,7 @@ def get_root_path(import_name: str) -> str:
return os.getcwd()
if hasattr(loader, "get_filename"):
filepath = loader.get_filename(import_name) # type: ignore
filepath = loader.get_filename(import_name)
else:
# Fall back to imports.
__import__(import_name)

View file

@ -225,7 +225,7 @@ class FlaskClient(Client):
buffered=buffered,
follow_redirects=follow_redirects,
)
response.json_module = self.application.json # type: ignore[misc]
response.json_module = self.application.json # type: ignore[assignment]
# Re-push contexts that were preserved during the request.
while self._new_contexts:

View file

@ -25,7 +25,7 @@ class Request(RequestBase):
specific ones.
"""
json_module = json
json_module: t.Any = json
#: The internal URL rule that matched the request. This can be
#: useful to inspect which methods are allowed for the URL from