Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hamilton/function_modifiers/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ def validate(self, fn: Callable):
f"Function: {fn.__qualname__} must have a return annotation."
)
# check that the return type is a dict
if return_annotation not in (dict, Dict):
if return_annotation not in (dict, Dict, "dict", "dict_"):
raise InvalidDecoratorException(f"Function: {fn.__qualname__} must return a dict.")

def generate_nodes(self, fn: Callable, config) -> List[node.Node]:
Expand Down
2 changes: 2 additions & 0 deletions tests/function_modifiers/test_adapters.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import dataclasses
from collections import Counter
from typing import Any, Collection, Dict, List, Tuple, Type
Expand Down