Skip to content

fix(types): cast image proxy to v2 to resolve mypy union-attr errors#1216

Open
berendt wants to merge 1 commit intomainfrom
fix-mypy
Open

fix(types): cast image proxy to v2 to resolve mypy union-attr errors#1216
berendt wants to merge 1 commit intomainfrom
fix-mypy

Conversation

@berendt
Copy link
Copy Markdown
Member

@berendt berendt commented May 4, 2026

The openstacksdk types Connection.image as a union of v1 and v2 proxies, but the codebase relies on v2-only methods (import_image, add_tag, remove_tag, deactivate_image, reactivate_image). Add an _image property that casts to the v2 proxy and route the v2-only call sites through it.

AI-assisted: Claude Code

The openstacksdk types `Connection.image` as a union of v1 and v2 proxies, but the
codebase relies on v2-only methods (import_image, add_tag, remove_tag,
deactivate_image, reactivate_image). Add an `_image` property that casts to the v2
proxy and route the v2-only call sites through it.

AI-assisted: Claude Code

Signed-off-by: Christian Berendt <berendt@osism.tech>
@berendt berendt requested a review from ideaship May 4, 2026 07:03
@ideaship
Copy link
Copy Markdown
Contributor

ideaship commented May 4, 2026

I cannot reproduce any errors. Is this fixing a CI error?

Copy link
Copy Markdown
Contributor

@ideaship ideaship left a comment

Choose a reason for hiding this comment

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

Can you say more about the failure this PR fixes? I'd like to reproduce it or study the CI log.

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.

3 participants