This is an automated email from the ASF dual-hosted git repository. skrawcz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/hamilton.git
commit faef6fccff8b0c195a4443449f2bab5e9a7f89c6 Author: Charles Swartz <[email protected]> AuthorDate: Sun Apr 6 09:43:22 2025 -0400 Use `Optional` for backward compatibility --- hamilton/function_modifiers/expanders.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hamilton/function_modifiers/expanders.py b/hamilton/function_modifiers/expanders.py index a5d13d23..864639df 100644 --- a/hamilton/function_modifiers/expanders.py +++ b/hamilton/function_modifiers/expanders.py @@ -3,7 +3,7 @@ import dataclasses import functools import inspect import typing -from typing import Any, Callable, Collection, Dict, List, Tuple, Type, Union +from typing import Any, Callable, Collection, Dict, List, Optional, Tuple, Type, Union import typing_extensions import typing_inspect @@ -874,7 +874,7 @@ class extract_fields(base.SingleNodeNodeTransformer): return output_nodes -def _process_unpack_fields(fields: List[str], output_type: Any) -> List[Type] | None: +def _process_unpack_fields(fields: List[str], output_type: Any) -> Optional[List[Type]]: """Processes the fields and base output type args to extract a tuple of field types. :param fields: Tuple of fields to extract from the tuple.
