Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengjieLi28 committed Jul 3, 2023
1 parent 2b628f3 commit fa298af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/xoscar/backends/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ async def handle_copy_to_buffers_message(self, message) -> ResultMessage:

async def handle_copy_to_fileobjs_message(self, message) -> ResultMessage:
for addr, uid, data in message.content:
file_obj = FileObjectRef.get_file_object(FileObjectRef(addr, uid))
file_obj = FileObjectRef.get_local_file_object(FileObjectRef(addr, uid))
await file_obj.write(data)
return ResultMessage(message_id=message.message_id, result=True)

Expand Down
6 changes: 3 additions & 3 deletions python/xoscar/core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ cdef class BufferRef:
return self.address == other.address and self.uid == other.uid

def __repr__(self):
return f'BufferRef(uid={self.uid}, address={self.address})'
return f'BufferRef(uid={self.uid.hex()}, address={self.address})'


cdef class FileObjectRef:
Expand All @@ -606,7 +606,7 @@ cdef class FileObjectRef:
return ref

@classmethod
def get_file_object(cls, ref: "FileObjectRef") -> AioFileObject:
def get_local_file_object(cls, ref: "FileObjectRef") -> AioFileObject:
return cls._ref_to_fileobjs[ref]

def __getstate__(self):
Expand All @@ -624,4 +624,4 @@ cdef class FileObjectRef:
return self.address == other.address and self.uid == other.uid

def __repr__(self):
return f'FileObjectRef(uid={self.uid}, address={self.address}'
return f'FileObjectRef(uid={self.uid.hex()}, address={self.address})'

0 comments on commit fa298af

Please sign in to comment.