mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-27 09:36:07 -04:00
Typecheck log_exceptions.py (#14941)
* Typecheck log_exceptions.py * typecheck log_exceptions --------- Co-authored-by: Earle Lowe <e.lowe@chia.net>
This commit is contained in:
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
import traceback
|
||||
from contextlib import contextmanager
|
||||
from typing import Tuple, Type, Union
|
||||
from typing import Iterator, Tuple, Type, Union
|
||||
|
||||
|
||||
@contextmanager
|
||||
@@ -15,7 +15,7 @@ def log_exceptions(
|
||||
level: int = logging.ERROR,
|
||||
show_traceback: bool = True,
|
||||
exceptions_to_process: Union[Type[BaseException], Tuple[Type[BaseException], ...]] = Exception,
|
||||
):
|
||||
) -> Iterator[None]:
|
||||
try:
|
||||
yield
|
||||
except exceptions_to_process as e:
|
||||
|
||||
@@ -48,7 +48,6 @@ chia.util.hash
|
||||
chia.util.json_util
|
||||
chia.util.keychain
|
||||
chia.util.keyring_wrapper
|
||||
chia.util.log_exceptions
|
||||
chia.util.make_test_constants
|
||||
chia.util.merkle_set
|
||||
chia.util.partial_func
|
||||
|
||||
Reference in New Issue
Block a user