From 30cfca9589aeeace0f5f8aae7b837f73c0fac408 Mon Sep 17 00:00:00 2001 From: Adam Kelly <338792+aqk@users.noreply.github.com> Date: Tue, 23 May 2023 12:24:56 -0700 Subject: [PATCH] Typecheck log_exceptions.py (#14941) * Typecheck log_exceptions.py * typecheck log_exceptions --------- Co-authored-by: Earle Lowe --- chia/util/log_exceptions.py | 4 ++-- mypy-exclusions.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chia/util/log_exceptions.py b/chia/util/log_exceptions.py index 241de7ec9c..f83b618c9b 100644 --- a/chia/util/log_exceptions.py +++ b/chia/util/log_exceptions.py @@ -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: diff --git a/mypy-exclusions.txt b/mypy-exclusions.txt index 3e8810ae9a..fe27b5bebc 100644 --- a/mypy-exclusions.txt +++ b/mypy-exclusions.txt @@ -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