Skip to content

Commit

Permalink
Fix backard compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
treff7es committed Dec 13, 2024
1 parent c59381e commit b38272e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@
from dagster._core.definitions.multi_asset_sensor_definition import (
AssetMaterializationFunctionReturn,
)
from dagster._core.definitions.sensor_definition import (
DefaultSensorStatus,
SensorReturnTypesUnion,
)
from dagster._core.definitions.sensor_definition import DefaultSensorStatus

# This SensorReturnTypesUnion is from Dagster 1.9.1+ and is not available in older versions
# of Dagster. We need to import it conditionally to avoid breaking compatibility with older
try:
from dagster._core.definitions.sensor_definition import SensorReturnTypesUnion
except ImportError:
from dagster._core.definitions.sensor_definition import RawSensorEvaluationFunctionReturn as SensorReturnTypesUnion # type: ignore

from dagster._core.definitions.target import ExecutableDefinition
from dagster._core.definitions.unresolved_asset_job_definition import (
UnresolvedAssetJobDefinition,
Expand Down

0 comments on commit b38272e

Please sign in to comment.