Skip to content

Commit

Permalink
Update type assertions in mutate_load_script()
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed May 7, 2024
1 parent 02e5ca0 commit 4c7a439
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/nextline_schedule/schema/mutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ def update(self, info: Info, input: MutationSchedulerInput) -> bool:


async def mutate_load_script(info: Info) -> bool:
nextline: Nextline = info.context["nextline"]
nextline = info.context["nextline"]
assert isinstance(nextline, Nextline)
scheduler = info.context['schedule']['scheduler']
assert isinstance(scheduler, RequestStatement)
assert callable(scheduler)
statement = await scheduler()
assert isinstance(statement, str)
await nextline.reset(statement=statement)
return True

Expand Down

0 comments on commit 4c7a439

Please sign in to comment.