Deleted types in __exit__ methods
This commit is contained in:
parent
fafc132dcb
commit
129f13c3b5
3 changed files with 4 additions and 11 deletions
|
|
@ -21,6 +21,7 @@ Unreleased
|
||||||
:issue:`4096`
|
:issue:`4096`
|
||||||
- The CLI loader handles ``**kwargs`` in a ``create_app`` function.
|
- The CLI loader handles ``**kwargs`` in a ``create_app`` function.
|
||||||
:issue:`4170`
|
:issue:`4170`
|
||||||
|
- Removed type-hints in ``__exit__`` methods. :pr:`4250`
|
||||||
|
|
||||||
|
|
||||||
Version 2.0.1
|
Version 2.0.1
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import sys
|
import sys
|
||||||
import typing as t
|
import typing as t
|
||||||
from functools import update_wrapper
|
from functools import update_wrapper
|
||||||
from types import TracebackType
|
|
||||||
|
|
||||||
from werkzeug.exceptions import HTTPException
|
from werkzeug.exceptions import HTTPException
|
||||||
|
|
||||||
|
|
@ -257,9 +256,7 @@ class AppContext:
|
||||||
self.push()
|
self.push()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(self, exc_type, exc_value, tb) -> None:
|
||||||
self, exc_type: type, exc_value: BaseException, tb: TracebackType
|
|
||||||
) -> None:
|
|
||||||
self.pop(exc_value)
|
self.pop(exc_value)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -463,9 +460,7 @@ class RequestContext:
|
||||||
self.push()
|
self.push()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(self, exc_type, exc_value, tb) -> None:
|
||||||
self, exc_type: type, exc_value: BaseException, tb: TracebackType
|
|
||||||
) -> None:
|
|
||||||
# do not pop the request stack if we are in debug mode and an
|
# do not pop the request stack if we are in debug mode and an
|
||||||
# exception happened. This will allow the debugger to still
|
# exception happened. This will allow the debugger to still
|
||||||
# access the request object in the interactive shell. Furthermore
|
# access the request object in the interactive shell. Furthermore
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import typing as t
|
import typing as t
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from types import TracebackType
|
|
||||||
|
|
||||||
import werkzeug.test
|
import werkzeug.test
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
|
@ -226,9 +225,7 @@ class FlaskClient(Client):
|
||||||
self.preserve_context = True
|
self.preserve_context = True
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(self, exc_type, exc_value, tb) -> None:
|
||||||
self, exc_type: type, exc_value: BaseException, tb: TracebackType
|
|
||||||
) -> None:
|
|
||||||
self.preserve_context = False
|
self.preserve_context = False
|
||||||
|
|
||||||
# Normally the request context is preserved until the next
|
# Normally the request context is preserved until the next
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue