Skip to content

Commit 69ede5a

Browse files
committed
Still need to check the existence of __annotations__.
1 parent 9fcabc6 commit 69ede5a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sdks/python/apache_beam/typehints/native_type_compatibility.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def _match_is_exactly_sequence(user_type):
164164
def match_is_named_tuple(user_type):
165165
return (
166166
_safe_issubclass(user_type, typing.Tuple) and
167+
hasattr(user_type, '__annotations__') and
167168
hasattr(user_type, '_fields'))
168169

169170

0 commit comments

Comments
 (0)