git rid of closed property on fileprotocol
This commit is contained in:
parent
df6711c5bf
commit
8171e67e70
2 changed files with 0 additions and 5 deletions
|
@ -29,8 +29,6 @@ class FileMode(str, Enum):
|
|||
|
||||
|
||||
class FileProtocol(Protocol):
|
||||
closed: bool
|
||||
|
||||
async def length(self) -> int | None:
|
||||
"""Return the length of the file, or None if the length cannot be determined."""
|
||||
raise NotImplementedError
|
||||
|
|
|
@ -29,7 +29,6 @@ class InMemoryFile:
|
|||
filename: bytes
|
||||
mode: FileMode
|
||||
data: io.BytesIO
|
||||
closed: bool
|
||||
complete_callback: Callable[[bytes, bytes], Awaitable[None]] | None
|
||||
incomplete_callback: Callable[[bytes, bytes], Awaitable[None]] | None
|
||||
|
||||
|
@ -48,7 +47,6 @@ class InMemoryFile:
|
|||
self.data = io.BytesIO(initial_bytes)
|
||||
self.complete_callback = complete_callback
|
||||
self.incomplete_callback = incomplete_callback
|
||||
self.closed = False
|
||||
|
||||
async def length(self) -> int:
|
||||
logger.debug("myfile length")
|
||||
|
@ -72,7 +70,6 @@ class InMemoryFile:
|
|||
await self.complete_callback(self.filename, self.data.getvalue())
|
||||
else:
|
||||
await self.incomplete_callback(self.filename, self.data.getvalue())
|
||||
self.closed = True
|
||||
|
||||
|
||||
class InMemoryFilesystem:
|
||||
|
|
Loading…
Reference in a new issue