diff --git a/onvif/utils/error_handlers.py b/onvif/utils/error_handlers.py index 213120d0..f63f1c8c 100644 --- a/onvif/utils/error_handlers.py +++ b/onvif/utils/error_handlers.py @@ -37,6 +37,8 @@ - `zeep.exceptions.Fault`: Base SOAP fault exception """ +from __future__ import annotations + import logging from collections.abc import Callable from typing import Any diff --git a/onvif/utils/exceptions.py b/onvif/utils/exceptions.py index cfbc0589..3e8f4a7d 100644 --- a/onvif/utils/exceptions.py +++ b/onvif/utils/exceptions.py @@ -1,5 +1,7 @@ """ONVIFOperationException: Enhanced exception wrapper for ONVIF operation failures.""" +from __future__ import annotations + import requests from zeep.exceptions import Fault @@ -86,7 +88,7 @@ class ONVIFOperationException(Exception): - `requests.exceptions.RequestException`: Base HTTP error """ - def __init__(self, operation, original_exception): + def __init__(self, operation: str, original_exception: Exception): self.operation = operation self.original_exception = original_exception diff --git a/onvif/utils/zeep.py b/onvif/utils/zeep.py index 2c30a753..847a699c 100644 --- a/onvif/utils/zeep.py +++ b/onvif/utils/zeep.py @@ -1,5 +1,7 @@ """ZeepPatcher: Patch zeep SOAP library to handle ONVIF `xsd:any` fields.""" +from __future__ import annotations + import logging from collections.abc import Callable from typing import Any