Skip to content

Correct the return type of boltons.strutils.gzip_bytes - #16954

Open
Lushiyao5 wants to merge 1 commit into
python:mainfrom
Lushiyao5:fix-boltons-gzip-bytes-result
Open

Lushiyao5 wants to merge 1 commit into
python:mainfrom
Lushiyao5:fix-boltons-gzip-bytes-result

Conversation

@Lushiyao5

Copy link
Copy Markdown
Contributor

gzip_bytes() returns the compressed bytes from the output buffer, but the current stub declares an int. Correct the return type to bytes.

I verified a round trip through gunzip_bytes(gzip_bytes(data)). Mypy rejects the bytes type assertion before this change and passes on the round-trip example and the updated stub afterward.

This patch was prepared with assistance from OpenAI Codex.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant