blob: 7a1f8d9729d534d55772fad8bab27fd25689bb14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# pylint: disable=missing-docstring,too-many-ancestors, broad-except
import collections.abc
from typing import TYPE_CHECKING, Any, MutableMapping
if TYPE_CHECKING:
BaseClass = MutableMapping[str, Any]
else:
BaseClass = collections.abc.MutableMapping
class TestBaseException(BaseClass):
pass
class TestException(TestBaseException):
pass
def test():
try:
1 / 0
except TestException: # [try-except-raise]
raise
except Exception:
pass
|