DavidKatz-il commented on code in PR #25054:
URL: https://github.com/apache/beam/pull/25054#discussion_r1081506681


##########
sdks/python/apache_beam/typehints/typehints.py:
##########
@@ -1186,20 +1186,18 @@ def __getitem__(self, type_params):
 
 def normalize(x, none_as_type=False):
   # None is inconsistantly used for Any, unknown, or NoneType.
+
+  # Avoid circular imports
+  from apache_beam.typehints import native_type_compatibility
+
+  if sys.version_info >= (3, 9) and isinstance(type, types.GenericAlias):
+    x = native_type_compatibility.convert_builtin_to_typing(x)

Review Comment:
   `isinstance(x, types.GenericAlias)` instead of `isinstance(type, 
types.GenericAlias)`



-- 
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]

Reply via email to