Skip to content

Conversation

@roberfi
Copy link
Contributor

@roberfi roberfi commented Nov 22, 2025

I've used info from stubs/docker/docker/api/daemon.pyi to annotate the following methods: df, events, info, login, ping and version.

Besides, to add the Generic type for events method, I've checked the behavior of that method in
https://github.com/docker/docker-py/blob/62bd22d9b7581157e118e5bc69f391f3331b3c6d/docker/api/daemon.py#L24, where _stream_helper takes decode argument to return text or json() from response.

On the other hand, the method close comes from requests.Session and returns None :
https://github.com/psf/requests/blob/70298332899f25826e35e42f8d83425124f755a5/src/requests/sessions.py#L794

@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit 40f0894 into python:main Nov 24, 2025
48 checks passed
@roberfi roberfi deleted the add-some-types-in-dockerclient branch November 25, 2025 14:00
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.

2 participants