typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

Specify stream type of Docker logs

Open adamtheturtle opened this issue 1 year ago • 1 comments

This allows us to have code like:

    for line in container.logs(stream=True):
	line.decode() # Type checker knows that `line` is bytes

adamtheturtle avatar Jun 26 '24 04:06 adamtheturtle

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

github-actions[bot] avatar Jun 26 '24 04:06 github-actions[bot]

@srittau @JelleZijlstra - sorry to bug but pinging just in case this was missed (among a group of PRs!). This is my first work with this kind of type, so any help is appreciated.

Thank you for all the hard work reviewing!

adamtheturtle avatar Jul 02 '24 13:07 adamtheturtle

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

github-actions[bot] avatar Jul 02 '24 17:07 github-actions[bot]

Thank you @AlexWaygood for the review. I have applied your requested changes.

adamtheturtle avatar Jul 02 '24 17:07 adamtheturtle

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

github-actions[bot] avatar Jul 02 '24 17:07 github-actions[bot]