From d0c2c83e8b20165eb94b5fdfc27ee4ca17ca6236 Mon Sep 17 00:00:00 2001 From: Owen Kephart Date: Tue, 30 Apr 2024 11:24:11 -0700 Subject: [PATCH] Remove unused fields --- .../declarative_scheduling/asset_condition.py | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/python_modules/dagster/dagster/_core/definitions/declarative_scheduling/asset_condition.py b/python_modules/dagster/dagster/_core/definitions/declarative_scheduling/asset_condition.py index adc8f038c2d02..8b74636167583 100644 --- a/python_modules/dagster/dagster/_core/definitions/declarative_scheduling/asset_condition.py +++ b/python_modules/dagster/dagster/_core/definitions/declarative_scheduling/asset_condition.py @@ -309,36 +309,10 @@ def __or__(self, other: "AssetCondition") -> "AssetCondition": def __invert__(self) -> "AssetCondition": return NotAssetCondition(operand=self) - @property - def is_legacy(self) -> bool: - """Returns if this condition is in the legacy format. This is used to determine if we can - do certain types of backwards-compatible operations on it. - """ - return ( - isinstance(self, AndAssetCondition) - and len(self.children) in {2, 3} - and isinstance(self.children[0], OrAssetCondition) - and isinstance(self.children[1], NotAssetCondition) - # the third child is the discard condition, which is optional - and (len(self.children) == 2 or isinstance(self.children[2], NotAssetCondition)) - ) - @property def children(self) -> Sequence["AssetCondition"]: return [] - @property - def not_skip_condition(self) -> Optional["AssetCondition"]: - if not self.is_legacy: - return None - return self.children[1] - - @property - def not_discard_condition(self) -> Optional["AssetCondition"]: - if not self.is_legacy or not len(self.children) == 3: - return None - return self.children[-1] - def get_snapshot(self, unique_id: str) -> AssetConditionSnapshot: """Returns a snapshot of this condition that can be used for serialization.""" return AssetConditionSnapshot(