File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
models-library/src/models_library
service-library/src/servicelib/data_streams Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 33
44from pydantic import ByteSize
55
6- FileNameInArchive : TypeAlias = str
76DataStream : TypeAlias = AsyncIterable [bytes ]
87
98DataStreamCallable : TypeAlias = Callable [[], DataStream ]
Original file line number Diff line number Diff line change 11from ._constants import DEFAULT_READ_CHUNK_SIZE
22from ._input import DiskStreamReader
3- from ._models import ArchiveEntries , ArchiveFileEntry , StreamData
3+ from ._models import StreamData
44from ._output import DiskStreamWriter
5- from ._zipper import get_zip_data_stream
5+ from ._stream_zip import ArchiveEntries , ArchiveFileEntry , get_zip_data_stream
66
77__all__ : tuple [str , ...] = (
88 "ArchiveEntries" ,
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
2- from typing import TypeAlias
32
4- from models_library .data_streams import (
5- DataSize ,
6- DataStream ,
7- DataStreamCallable ,
8- FileNameInArchive ,
9- )
3+ from models_library .data_streams import DataSize , DataStream , DataStreamCallable
104
115from ..progress_bar import ProgressBarData
126
@@ -22,7 +16,3 @@ async def with_progress_data_stream(
2216 async for chunk in self .data_stream_callable ():
2317 await progress_bar .update (len (chunk ))
2418 yield chunk
25-
26-
27- ArchiveFileEntry : TypeAlias = tuple [FileNameInArchive , StreamData ]
28- ArchiveEntries : TypeAlias = list [ArchiveFileEntry ]
Original file line number Diff line number Diff line change 11from collections .abc import AsyncIterable
22from datetime import UTC , datetime
33from stat import S_IFREG
4+ from typing import TypeAlias
45
56from models_library .data_streams import DataSize , DataStream
67from stream_zip import ZIP_32 , AsyncMemberFile , async_stream_zip
78
89from ..progress_bar import ProgressBarData
9- from ._models import ArchiveEntries
10+ from ._models import StreamData
11+
12+ FileNameInArchive : TypeAlias = str
13+ ArchiveFileEntry : TypeAlias = tuple [FileNameInArchive , StreamData ]
14+ ArchiveEntries : TypeAlias = list [ArchiveFileEntry ]
1015
1116
1217async def _member_files_iter (
You can’t perform that action at this time.
0 commit comments