refactor: split parse into multiple files
Signed-off-by: Konstantin Fickel <mail@konstantinfickel.de>
This commit is contained in:
parent
082c13b046
commit
dc2a97d3b8
6 changed files with 117 additions and 92 deletions
19
src/streamer/parse/shard.py
Normal file
19
src/streamer/parse/shard.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from __future__ import annotations
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Shard(BaseModel):
|
||||
markers: list[str] = []
|
||||
tags: list[str] = []
|
||||
start_line: int
|
||||
end_line: int
|
||||
children: list[Shard] = []
|
||||
|
||||
|
||||
class StreamFile(BaseModel):
|
||||
filename: str
|
||||
shard: Optional[Shard] = None
|
||||
|
||||
|
||||
__all__ = ["Shard", "StreamFile"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue