From cb172edca0dc0b4cab682df8e6c32d1a0f09514e Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 16 Dec 2025 16:22:07 -0800 Subject: [PATCH] Fix type warning for pipe.stdout possibly being None MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add conditional check before calling .read() on pipe.stdout since Popen can return None for stdout. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 859c6b9..04a2301 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -79,7 +79,7 @@ author = "Simon Willison" # # The short X.Y version. pipe = Popen("git describe --tags --always", stdout=PIPE, shell=True) -git_version = pipe.stdout.read().decode("utf8") +git_version = pipe.stdout.read().decode("utf8") if pipe.stdout else "" if git_version: version = git_version.rsplit("-", 1)[0]