Ancient python compat

This commit is contained in:
Kovid Goyal 2021-09-16 13:50:05 +05:30
parent d042ea5ab9
commit deb6abe50e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,7 +88,7 @@ class File:
self.transmit_started_at = self.transmit_ended_at = 0. self.transmit_started_at = self.transmit_ended_at = 0.
def __repr__(self) -> str: def __repr__(self) -> str:
return f'File({self.display_name=}, {self.file_type=}, {self.state=})' return f'File(name={self.display_name}, ft={self.file_type}, state={self.state})'
def next_chunk(self, sz: int = 1024 * 1024) -> Tuple[bytes, int]: def next_chunk(self, sz: int = 1024 * 1024) -> Tuple[bytes, int]:
if self.file_type is FileType.symlink: if self.file_type is FileType.symlink: