jrmccluskey commented on code in PR #38334:
URL: https://github.com/apache/beam/pull/38334#discussion_r3183106996
##########
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:
there's what is effectively a unit test for this functionality that exists
strictly in the xlang integration test suites that was breaking on changing
from the typing types to the built-ins, since it didn't know how to handle the
built-ins. I felt like it was probably best to update the code to handle both
cases here
--
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]