Skip to content

Typed handle for LibreOfficeSession.load_workbook / close_workbook #77

@coderabbitai

Description

@coderabbitai

Background

LibreOfficeSession.load_workbook() currently returns a raw dict token and LibreOfficeSession.close_workbook() is a no-op. This was flagged during the review of PR #76 (#76) and deferred as out of scope for that PR.

As noted by the reviewer, the current public session contract is easy to misuse and provides mypy with almost no useful type information.

Suggested improvement

Replace the raw dict return with a proper typed handle (e.g., a frozen dataclass LibreOfficeWorkbookHandle), and implement meaningful cleanup logic in close_workbook() once the subprocess lifecycle is formalised.

Reference comment: #76 (comment)

Requested by: @harumiWeb

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions