Skip to content

Commit

Permalink
Help mypy: job is never None
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Mar 4, 2024
1 parent 872630b commit 3e6b6a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,9 @@ def galaxy_url(self):
return self.get_destination_configuration("galaxy_infrastructure_url")

def get_job(self) -> model.Job:
return self.sa_session.get(Job, self.job_id) # type:ignore[return-value]
job = self.sa_session.get(Job, self.job_id)
assert job
return job

def get_id_tag(self):
# For compatibility with drmaa, which uses job_id right now, and TaskWrapper
Expand Down

0 comments on commit 3e6b6a4

Please sign in to comment.