Skip to content

Commit

Permalink
chore: resolved mypy errors with experiment endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarbMITRE committed Jul 20, 2023
1 parent 62f1698 commit 5592e04
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions src/dioptra/client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
tasks_plugins,
custom_task_plugins,
builtin_task_plugins,
):
) -> None:
self._session = session
self._experiment = experiment
self._job = job
Expand Down Expand Up @@ -148,7 +148,14 @@ def session(self):
def experiment_endpoint(self) -> str:
"""Experiment endpoint url"""
return urlunparse(
(self._scheme, self._netloc, urljoin(self._path, "experiment/"), "", "", "")
(
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "experiment/"),
"",
"",
"",
)
)

def set_session(self, session: requests.Session):
Expand Down Expand Up @@ -303,7 +310,14 @@ def session(self):
def job_endpoint(self) -> str:
"""Job endpoint url"""
return urlunparse(
(self._scheme, self._netloc, urljoin(self._path, "job/"), "", "", "")
(
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "job/"),
"",
"",
"",
)
)

def set_session(self, session: requests.Session):
Expand Down Expand Up @@ -490,7 +504,14 @@ def session(self):
def task_plugin_endpoint(self) -> str:
"""Task plugins endpoint url"""
return urlunparse(
(self._scheme, self._netloc, urljoin(self._path, "taskPlugin/"), "", "", "")
(
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "taskPlugin/"),
"",
"",
"",
)
)

def set_session(self, session: requests.Session):
Expand Down Expand Up @@ -562,9 +583,9 @@ def task_plugin_builtins_endpoint(self) -> str:
"""Builtin task plugins endpoint url"""
return urlunparse(
(
self._scheme,
self._netloc,
urljoin(self._path, "taskPlugin/dioptra_builtins"),
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "taskPlugin/dioptra_builtins"),
"",
"",
"",
Expand Down Expand Up @@ -679,7 +700,14 @@ def task_plugin_custom_endpoint(self) -> str:
def task_plugin_endpoint(self) -> str:
"""Task plugins endpoint url"""
return urlunparse(
(self._scheme, self._netloc, urljoin(self._path, "taskPlugin/"), "", "", "")
(
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "taskPlugin/"),
"",
"",
"",
)
)

def set_session(self, session: requests.Session):
Expand Down Expand Up @@ -869,7 +897,14 @@ def session(self):
def queue_endpoint(self) -> str:
"""Queue endpoint url"""
return urlunparse(
(self._scheme, self._netloc, urljoin(self._path, "queue/"), "", "", "")
(
str(self._scheme),
str(self._netloc),
urljoin(str(self._path), "queue/"),
"",
"",
"",
)
)

def set_session(self, session: requests.Session):
Expand Down

0 comments on commit 5592e04

Please sign in to comment.