Skip to content

Commit

Permalink
Fix type of Job.state, remove type:ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Apr 12, 2024
1 parent e96b00c commit 14ec017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ def change_state(self, state, info=False, flush=True, job=None):
def get_state(self) -> str:
job = self.get_job()
self.sa_session.refresh(job)
return job.state # type:ignore[return-value]
return job.state

def set_runner(self, runner_url, external_id):
log.warning("set_runner() is deprecated, use set_job_destination()")
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ class Job(Base, JobLike, UsesCreateAndUpdateTime, Dictifiable, Serializable):
tool_version: Mapped[Optional[str]] = mapped_column(TEXT, default="1.0.0")
galaxy_version: Mapped[Optional[str]] = mapped_column(String(64), default=None)
dynamic_tool_id: Mapped[Optional[int]] = mapped_column(ForeignKey("dynamic_tool.id"), index=True)
state: Mapped[Optional[str]] = mapped_column(String(64), index=True)
state: Mapped[str] = mapped_column(String(64), index=True, nullable=True)
info: Mapped[Optional[str]] = mapped_column(TrimmedString(255))
copied_from_job_id: Mapped[Optional[int]]
command_line: Mapped[Optional[str]] = mapped_column(TEXT)
Expand Down

0 comments on commit 14ec017

Please sign in to comment.