Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 0bee865

Browse files
committed
Is_composite to return True instead of parts when there are parts
----Release Notes---- [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123036263
1 parent d931cdd commit 0bee865

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

google/cloud/dataflow/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ def is_composite(self):
374374
"""Returns whether this is a composite transform.
375375
376376
A composite transform has parts (inner transforms) or isn't the
377-
producer for any of its outputs. (An exmaple of a transform that
377+
producer for any of its outputs. (An example of a transform that
378378
is not a producer is one that returns its inputs instead.)
379379
"""
380-
return self.parts or all(
380+
return bool(self.parts) or all(
381381
pval.producer is not self for pval in self.outputs.values())
382382

383383
def visit(self, visitor, pipeline, visited):

0 commit comments

Comments
 (0)