From 0f8d7b2df1fe5c6109fde13404d6cd0ffeac336c Mon Sep 17 00:00:00 2001 From: Andrew Yim Date: Mon, 27 Apr 2026 11:23:49 +0900 Subject: [PATCH] fix(notion-writer): use module-level sys instead of inline import in toggle warning Code review caught a redundant `import sys as _sys` inside the unclosed-
branch. The module already imports `sys` at the top, so the inline import was dead weight. Use the module-level `sys.stderr` directly. 26/26 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) --- custom-skills/32-notion-writer/code/scripts/notion_writer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom-skills/32-notion-writer/code/scripts/notion_writer.py b/custom-skills/32-notion-writer/code/scripts/notion_writer.py index 1b3224c..20b3409 100644 --- a/custom-skills/32-notion-writer/code/scripts/notion_writer.py +++ b/custom-skills/32-notion-writer/code/scripts/notion_writer.py @@ -123,9 +123,8 @@ def _parse_lines(lines: List[str]) -> List[Dict[str, Any]]: i += 1 if depth > 0: # Unclosed
at EOF — degrade to paragraphs - import sys as _sys print("Warning: unclosed
at EOF; emitting body as paragraphs", - file=_sys.stderr) + file=sys.stderr) if summary_text: blocks.append(create_paragraph_block(summary_text)) for inner in inner_lines: