style: give Protocol stubs docstring bodies

Replace the `...` bodies in DocumentParser / StorageEngine protocol methods
with one-line docstrings: silences the CodeQL "statement has no effect" false
positives on #272 (`...` is idiomatic for typing.Protocol, but docstrings
document the contract and don't trip the analyzer) with no behavior change.

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
This commit is contained in:
mountain 2026-07-08 17:33:41 +08:00
parent 2a69c76b7f
commit 703017e581
2 changed files with 42 additions and 14 deletions

View file

@ -24,5 +24,8 @@ class ParsedDocument:
@runtime_checkable
class DocumentParser(Protocol):
def supported_extensions(self) -> list[str]: ...
def parse(self, file_path: str, **kwargs) -> ParsedDocument: ...
def supported_extensions(self) -> list[str]:
"""Return the file extensions this parser handles (e.g. ['.pdf'])."""
def parse(self, file_path: str, **kwargs) -> ParsedDocument:
"""Parse a file into a ParsedDocument (a flat list of ContentNode)."""