Skip to content

Commit cb172ed

Browse files
simonwclaude
andcommitted
Fix type warning for pipe.stdout possibly being None
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 <[email protected]>
1 parent fd5b09f commit cb172ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def linkcode_resolve(domain, info):
7979
#
8080
# The short X.Y version.
8181
pipe = Popen("git describe --tags --always", stdout=PIPE, shell=True)
82-
git_version = pipe.stdout.read().decode("utf8")
82+
git_version = pipe.stdout.read().decode("utf8") if pipe.stdout else ""
8383

8484
if git_version:
8585
version = git_version.rsplit("-", 1)[0]

0 commit comments

Comments
 (0)