Skip to content

Commit

Permalink
make pyright happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Jan 29, 2024
1 parent 5bf8b32 commit a0bec89
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,18 @@ def test_context_partition_time_window():

@asset(partitions_def=partitions_def)
def my_asset(context: AssetExecutionContext):
time_partition = get_time_partitions_def(partitions_def)
if time_partition is None:
assert False, "expected a time component in the partitions definition"

time_window = TimeWindow(
start=pendulum.instance(
datetime(year=2020, month=1, day=1),
tz=get_time_partitions_def(partitions_def).timezone,
tz=time_partition.timezone,
),
end=pendulum.instance(
datetime(year=2020, month=1, day=2),
tz=get_time_partitions_def(partitions_def).timezone,
tz=time_partition.timezone,
),
)
assert context.partition_time_window == time_window
Expand Down

0 comments on commit a0bec89

Please sign in to comment.