From 06d9ab8f751eb9cca0440de09b8194ae03bab251 Mon Sep 17 00:00:00 2001 From: OwenKephart Date: Fri, 3 May 2024 15:00:38 -0700 Subject: [PATCH] [DS][14/n] Remove unused methods and properties (#21535) ## Summary & Motivation As title. ## How I Tested These Changes --- .../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(