Skip to content

Commit c2103ea

Browse files
committed
Fix errors on newest mypy release
1 parent e150aae commit c2103ea

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tox
5252
A subset of checks can also be ran by adding an argument to tox. The available
5353
arguments are:
5454

55-
- py36, py37, py38, py39, py310, pypy3
55+
- py37, py38, py39, py310, pypy3
5656
- Run unit tests on the given python version
5757
- mypy
5858
- Run mypy type checking

flask_jwt_extended/view_decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def verify_jwt_in_request(
8585
if request.method in config.exempt_methods:
8686
return None
8787

88+
# Should be impossible to hit, this makes mypy checks happy
89+
if not _request_ctx_stack.top: # pragma: no cover
90+
raise RuntimeError("No _request_ctx_stack.top present, aborting")
91+
8892
try:
8993
jwt_data, jwt_header, jwt_location = _decode_jwt_from_request(
9094
locations, fresh, refresh=refresh, verify_type=verify_type

0 commit comments

Comments
 (0)