Skip to content

Commit

Permalink
implemented suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
kessler-frost committed Oct 12, 2023
1 parent c3be087 commit 1c7aa36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions covalent/_workflow/transportable_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,19 @@ def cat(self) -> bytes:

return string_offset + data_offset + self.header + self.object_string + self.data

def load(self, header_only: bool, string_only: bool) -> "_TOArchive":
string_offset = TOArchiveUtils.string_offset(self)
header = TOArchiveUtils.parse_header(self, string_offset)
@staticmethod
def load(serialized: bytes, header_only: bool, string_only: bool) -> "_TOArchive":
string_offset = TOArchiveUtils.string_offset(serialized)
header = TOArchiveUtils.parse_header(serialized, string_offset)
object_string = b""
data = b""

if not header_only:
data_offset = TOArchiveUtils.data_offset(self)
object_string = TOArchiveUtils.parse_string(self, string_offset, data_offset)
data_offset = TOArchiveUtils.data_offset(serialized)
object_string = TOArchiveUtils.parse_string(serialized, string_offset, data_offset)

if not string_only:
data = TOArchiveUtils.parse_data(self, data_offset)
data = TOArchiveUtils.parse_data(serialized, data_offset)
return _TOArchive(header, object_string, data)


Expand Down
2 changes: 1 addition & 1 deletion covalent_dispatcher/_dal/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _update_node(
error: Exception = None,
stdout: str = None,
stderr: str = None,
qelectron_data_exists: bool = False,
qelectron_data_exists: bool = None,
) -> bool:
"""
Update the node result in the transport graph.
Expand Down

0 comments on commit 1c7aa36

Please sign in to comment.