Skip to content

Commit

Permalink
Remove unnecessary comprehension loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Claude committed Oct 15, 2024
1 parent 770e73d commit b17abe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ def __call__(self, request: Union[beam.Row, List[beam.Row]], *args, **kwargs):
"Make sure the values passed in `fields` are the "
"keys in the input `beam.Row`." + str(e))
values.extend(current_values)
requests_map.update(
(self.create_row_key(req), req) for val in current_values)
requests_map[self.create_row_key(req)] = req
query = raw_query.format(*values)

responses_dict = self._execute_query(query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
#
import functools
import logging
import unittest
import secrets
import time

import unittest
from unittest.mock import MagicMock

import pytest
Expand Down Expand Up @@ -55,6 +54,7 @@ def query_fn(table, row: beam.Row):
return f"SELECT * FROM `{table}` WHERE id = {row.id}" # type: ignore[attr-defined]


@pytest.mark.uses_testcontainer
class BigQueryEnrichmentIT(unittest.TestCase):
bigquery_dataset_id = 'python_enrichment_transform_read_table_'
project = "apache-beam-testing"
Expand Down

0 comments on commit b17abe9

Please sign in to comment.