Skip to content

Commit

Permalink
Merge branch 'dev' into rasswanth/remove-unused-code
Browse files Browse the repository at this point in the history
  • Loading branch information
rasswanth-s committed May 21, 2024
2 parents c318271 + d26e911 commit 7bb1eca
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions packages/syft/src/syft/service/request/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ def _coll_repr_(self) -> dict[str, str | dict[str, str]]:
]

return {
"Request time": str(self.request_time),
"Description": self.html_description,
"Requested By": "\n".join(user_data),
"Creation Time": str(self.request_time),
"Status": status_badge,
}

Expand Down Expand Up @@ -1220,18 +1220,19 @@ def nested_repr(self, node: Any | None = None, level: int = 0) -> str:

def __repr_syft_nested__(self) -> str:
msg = (
f"Request to change <b>{self.code.service_func_name}</b> "
f"(Pool Id: <b>{self.code.worker_pool_name}</b>) "
f"Request to change <strong>{self.code.service_func_name}</strong> "
f"(Pool Id: <strong>{self.code.worker_pool_name}</strong>) "
)
msg += "to permission <strong>RequestStatus.APPROVED.</strong>"
if self.nested_solved:
if self.link.nested_codes == {}: # type: ignore
msg += "No nested requests."
else:
msg += "to permission RequestStatus.APPROVED."
if self.code.nested_codes is None or self.code.nested_codes == {}: # type: ignore
msg += " No nested requests"
else:
if self.nested_solved:
# else:
msg += "<br><br>This change requests the following nested functions calls:<br>"
msg += self.nested_repr()
else:
msg += "Nested Requests not resolved."
else:
msg += " Nested Requests not resolved"
return msg

def _repr_markdown_(self, wrap_as_python: bool = True, indent: int = 0) -> str:
Expand Down

0 comments on commit 7bb1eca

Please sign in to comment.