Skip to content

Commit

Permalink
Type annotation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Mar 6, 2024
1 parent 5dc0fbc commit 7dd1002
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/tool_util/client/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _fetch_post(self, payload: Dict[str, Any]) -> List[Dict[str, Any]]:
return job_details

@abc.abstractmethod
def _handle_job(self, job_response):
def _handle_job(self, job_response: Dict[str, Any]) -> Dict[str, Any]:
"""Implementer can decide if to wait for job(s) individually or not here."""

def stage(
Expand Down Expand Up @@ -289,7 +289,7 @@ def _post(self, api_path: str, payload: Dict[str, Any]) -> Dict[str, Any]:
assert response.status_code == 200, response.text
return response.json()

def _handle_job(self, job_response):
def _handle_job(self, job_response: Dict[str, Any]) -> Dict[str, Any]:
self.galaxy_interactor.wait_for_job(job_response["id"])
return self.galaxy_interactor.get_job_stdio(job_response["id"])

Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/tool_util/verify/interactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,14 @@ def wait_for(self, func, what="tool test run", **kwd):
walltime_exceeded = int(kwd.get("maxseconds", DEFAULT_TOOL_TEST_WAIT))
wait_on(func, what, walltime_exceeded)

def get_job_stdio(self, job_id):
def get_job_stdio(self, job_id: str) -> Dict[str, Any]:
job_stdio = self.__get_job_stdio(job_id).json()
return job_stdio

def __get_job(self, job_id):
def __get_job(self, job_id: str) -> Response:
return self._get(f"jobs/{job_id}")

def __get_job_stdio(self, job_id):
def __get_job_stdio(self, job_id: str) -> Response:
return self._get(f"jobs/{job_id}?full=true")

def get_history(self, history_name="test_history"):
Expand Down

0 comments on commit 7dd1002

Please sign in to comment.