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


##########
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:
   Why do we need this change? It seems odd to nest it in a large scale 
migration.



##########
sdks/python/ruff.toml:
##########
@@ -56,7 +56,7 @@ target-version = "py310"
 src = ["apache_beam"]
 
 [lint]
-select = ["E9", "PL", "F821", "F822", "F823"]
+select = ["E9", "PL", "F821", "F822", "F823", "UP006"]

Review Comment:
   This PR mostly looks good to me, but its unclear to me how much value there 
is here - does this migration help us beyond minor standardization?



##########
sdks/python/ruff.toml:
##########
@@ -56,7 +56,7 @@ target-version = "py310"
 src = ["apache_beam"]
 
 [lint]
-select = ["E9", "PL", "F821", "F822", "F823"]
+select = ["E9", "PL", "F821", "F822", "F823", "UP006"]

Review Comment:
   I don't really mind taking it, but trying to understand the value



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