tvalentyn commented on code in PR #37585:
URL: https://github.com/apache/beam/pull/37585#discussion_r2801933772


##########
sdks/python/apache_beam/yaml/yaml_provider_unit_test.py:
##########
@@ -364,3 +364,17 @@ def test_empty_base(self):
 if __name__ == '__main__':
   logging.getLogger().setLevel(logging.INFO)
   unittest.main()
+
+
+class YamlProvidersCreateTest(unittest.TestCase):
+  def test_create_mixed_types(self):
+    with beam.Pipeline(options=beam.options.pipeline_options.PipelineOptions(
+        pickle_library='cloudpickle')) as p:

Review Comment:
   pickle_library should be already cloudpickle by default



##########
sdks/python/apache_beam/yaml/yaml_provider.py:
##########
@@ -878,6 +878,31 @@ def create(elements: Iterable[Any], reshuffle: 
Optional[bool] = True):
     if not isinstance(elements, Iterable) or isinstance(elements, (dict, str)):
       raise TypeError('elements must be a list of elements')
 
+    if elements:
+      # Normalize elements to be all dicts or all primitives.

Review Comment:
   should some of this comment content be part of the docstring?



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