Skip to content

Commit

Permalink
Fix Ruff rule B023
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Oct 27, 2024
1 parent f011508 commit b43e55c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tfx/components/example_diff/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ def Do(self, input_dict: Dict[str, List[types.Artifact]],
logging.info('Processing split pair %s', split_pair)
# pylint: disable=cell-var-from-loop
@beam.ptransform_fn
def _iteration(p):
def _iteration(p,
test_tfxio=test_tfxio,
base_tfxio=base_tfxio,
split_pair=split_pair
):
base_examples = (
p | 'TFXIORead[base]' >> test_tfxio.RawRecordBeamSource()
| 'Parse[base]' >> beam.Map(_parse_example))
Expand Down
4 changes: 2 additions & 2 deletions tfx/dsl/placeholder/proto_placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,11 +509,11 @@ def _purge_types(
_purge_types(name_prefix, message_descriptor) # Step 2
_remove_unless(
file_descriptor.message_type,
lambda m: f'{name_prefix}.{m.name}' in self._keep_types, # pylint: disable=cell-var-from-loop
lambda m, name_prefix=name_prefix: f'{name_prefix}.{m.name}' in self._keep_types, # pylint: disable=cell-var-from-loop
)
_remove_unless(
file_descriptor.enum_type,
lambda e: f'{name_prefix}.{e.name}' in self._keep_types, # pylint: disable=cell-var-from-loop
lambda e, name_prefix=name_prefix: f'{name_prefix}.{e.name}' in self._keep_types, # pylint: disable=cell-var-from-loop
)

# Step 4: Remove file descriptors that became empty. Remove declared
Expand Down

0 comments on commit b43e55c

Please sign in to comment.