Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Image type for docker container run image parameter #11900

Merged
merged 1 commit into from May 12, 2024

Conversation

adamtheturtle
Copy link
Contributor

@adamtheturtle adamtheturtle commented May 11, 2024

The docstring says that this must be a string, but the implementation explicitly allows an Image:

https://github.com/docker/docker-py/blob/b6464dbed92b14b2c61d5ee49805fce041a3e083/docker/models/containers.py#L850-L851

if isinstance(image, Image):
    image = image.id

The docstring says that this must be a string, but the implementation
explicitly allows an Image:

https://github.com/docker/docker-py/blob/b6464dbed92b14b2c61d5ee49805fce041a3e083/docker/models/containers.py#L850-L851

```python
if isinstance(image, Image):
            image = image.id
```
Copy link
Contributor

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

@srittau srittau merged commit f75211b into python:main May 12, 2024
42 checks passed
@adamtheturtle adamtheturtle deleted the allow-image-docker-container-run branch May 12, 2024 10:18
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.

None yet

2 participants