import BaseExceptionGroup with explicit version check instead of try/catch
This commit is contained in:
parent
b457013e97
commit
1a6a158036
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue