TheNeuralBit commented on a change in pull request #15539:
URL: https://github.com/apache/beam/pull/15539#discussion_r712491402
##########
File path: sdks/python/apache_beam/typehints/native_type_compatibility.py
##########
@@ -107,7 +107,7 @@ def _match_is_exactly_iterable(user_type):
def match_is_named_tuple(user_type):
return (
_safe_issubclass(user_type, typing.Tuple) and
- hasattr(user_type, '_field_types'))
+ hasattr(user_type, '__annotations__'))
Review comment:
Are we sure this won't lead to false positives? That is, are we sure the
only way a tuple subclass will have an `__annotations__` attribute is when it's
a `NamedTuple`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]