From c4f31f450e6e2414b8f5938c400a097e5aa27daa Mon Sep 17 00:00:00 2001 From: Silcantar Date: Fri, 6 Nov 2026 08:26:02 -0600 Subject: [PATCH] Fix typing issues in debug_tools. --- src/AuDaGe/debug_tools.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/AuDaGe/debug_tools.py b/src/AuDaGe/debug_tools.py index 85a2d55..80ee14f 100644 --- a/src/AuDaGe/debug_tools.py +++ b/src/AuDaGe/debug_tools.py @@ -11,9 +11,10 @@ desc: Debugging tools for AuDaGe. import time from collections.abc import Callable from enum import IntEnum +from typing import Any -def print_and_return(value: any) -> any: +def print_and_return(value: Any) -> Any: print(value) return value @@ -24,7 +25,7 @@ def catch( *args, handle: Callable = lambda e: e, **kwargs, -) -> any: +) -> Any: """Function for catching errors in-line. Parameters @@ -48,16 +49,16 @@ def catch( """ try: return func(*args, **kwargs) - except exception as e: + except exception as e: # ty: ignore[invalid-exception-caught] return handle(e) class TimeUnit(IntEnum): """Conversion ratios to/from nanoseconds for various time units.""" - NS = 1e9 - US = 1e6 - MS = 1e3 + NS = 1_000_000_000 + US = 1_000_000 + MS = 1_000 S = 1