summaryrefslogtreecommitdiff
path: root/kombu/transport/base.py
diff options
context:
space:
mode:
authorMarcelo Trylesinski <marcelotryle@gmail.com>2022-04-14 13:02:52 +0200
committerAsif Saif Uddin <auvipy@gmail.com>2022-04-15 14:16:57 +0600
commit7516daf7a774dd9671d16c475c6ac266de977a0a (patch)
tree2ea3d3cca1201943b26aaa162bf9eaa01d5d3542 /kombu/transport/base.py
parenta93099b671f83ed5a3f723198cb821041ca5e13e (diff)
downloadkombu-7516daf7a774dd9671d16c475c6ac266de977a0a.tar.gz
Bump pyupgrade version and add __future__.annotations import
Diffstat (limited to 'kombu/transport/base.py')
-rw-r--r--kombu/transport/base.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/kombu/transport/base.py b/kombu/transport/base.py
index 62a84fda..ec4c0aca 100644
--- a/kombu/transport/base.py
+++ b/kombu/transport/base.py
@@ -2,9 +2,11 @@
# flake8: noqa
+from __future__ import annotations
+
import errno
import socket
-from typing import TYPE_CHECKING, Optional, Type
+from typing import TYPE_CHECKING
from amqp.exceptions import RecoverableConnectionError
@@ -106,9 +108,9 @@ class StdChannel:
def __exit__(
self,
- exc_type: Optional[Type[BaseException]],
- exc_val: Optional[BaseException],
- exc_tb: Optional['TracebackType']
+ exc_type: type[BaseException] | None,
+ exc_val: BaseException | None,
+ exc_tb: TracebackType | None
) -> None:
self.close()