import BaseExceptionGroup with explicit version check instead of try/catch

This commit is contained in:
jakkdl 2022-08-16 16:05:55 +02:00
parent b457013e97
commit 1a6a158036
1 changed files with 1 additions and 4 deletions

View File

@ -56,10 +56,7 @@ if TYPE_CHECKING:
_TracebackStyle = Literal["long", "short", "line", "no", "native", "value", "auto"]
BaseExceptionGroup: Type[BaseException]
try:
BaseExceptionGroup = BaseExceptionGroup # type: ignore
except NameError:
if sys.version_info[:2] < (3, 11):
from exceptiongroup import BaseExceptionGroup