From 132c9d5f74ac9b69cf3f3e61c3af86ab4a394141 Mon Sep 17 00:00:00 2001 From: Jack McCluskey Date: Thu, 9 Jan 2025 10:49:15 -0500 Subject: [PATCH] use yapf 0.29.0 --- sdks/python/apache_beam/yaml/yaml_io.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdks/python/apache_beam/yaml/yaml_io.py b/sdks/python/apache_beam/yaml/yaml_io.py index 51a427bc949..5bae59363e1 100644 --- a/sdks/python/apache_beam/yaml/yaml_io.py +++ b/sdks/python/apache_beam/yaml/yaml_io.py @@ -77,8 +77,8 @@ def write_to_text(pcoll, path: str): """ try: field_names = [ - name for name, _ in schemas.named_fields_from_element_type( - pcoll.element_type) + name for name, + _ in schemas.named_fields_from_element_type(pcoll.element_type) ] except Exception as exn: raise ValueError( @@ -167,9 +167,7 @@ def write_to_bigquery( described at https://beam.apache.org/documentation/sdks/yaml-errors/ Otherwise permanently failing records will cause pipeline failure. """ - class WriteToBigQueryHandlingErrors(beam.PTransform): - def default_label(self): return 'WriteToBigQuery' @@ -238,7 +236,8 @@ def _validate_schema(): beam_schema = avroio.avro_schema_to_beam_schema(schema) covert_to_row = avroio.avro_dict_to_beam_row(schema, beam_schema) return ( - beam_schema, lambda record: covert_to_row( + beam_schema, + lambda record: covert_to_row( fastavro.schemaless_reader( fo=io.BytesIO(record), writer_schema=schema))) else: