diff --git a/python_modules/dagster/dagster/_core/definitions/asset_condition.py b/python_modules/dagster/dagster/_core/definitions/asset_condition.py index 592e541770548..145b0698c1c8e 100644 --- a/python_modules/dagster/dagster/_core/definitions/asset_condition.py +++ b/python_modules/dagster/dagster/_core/definitions/asset_condition.py @@ -76,6 +76,10 @@ def equivalent_to_stored_evaluation(self, other: Optional["AssetConditionEvaluat ) def discarded_subset(self, condition: "AssetCondition") -> Optional[AssetSubset]: + """Returns the AssetSubset representing asset partitions that were discarded during this + evaluation. Note that 'discarding' is a deprecated concept that is only used for backwards + compatibility. + """ not_discard_condition = condition.not_discard_condition if not not_discard_condition or len(self.child_evaluations) != 3: return None @@ -88,7 +92,8 @@ def get_requested_or_discarded_subset(self, condition: "AssetCondition") -> Asse discarded_subset = self.discarded_subset(condition) if discarded_subset is None: return self.true_subset - return self.true_subset | discarded_subset + else: + return self.true_subset | discarded_subset def for_child(self, child_condition: "AssetCondition") -> Optional["AssetConditionEvaluation"]: """Returns the evaluation of a given child condition by finding the child evaluation that