damccorm commented on code in PR #38334:
URL: https://github.com/apache/beam/pull/38334#discussion_r3183705602


##########
sdks/python/gen_xlang_wrappers.py:
##########
@@ -227,7 +225,11 @@ def pretty_type(tp):
   # TODO(ahmedabu98): Make this more generic to support other remote SDKs
   # Potentially use Runner API types
   if tp.__module__ == 'builtins':
-    tp = tp.__name__
+    if getattr(tp, '__origin__', None) is None:
+      tp = tp.__name__
+    else:
+      # Remove nested typing module name (like Optional)
+      tp = str(tp).replace("typing.", "")

Review Comment:
   Oh I see - this is valid because we're already in a branch with only 
builtins. I think this seems ok



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