Skip to content

fix GPUPromise type annotation#812

Open
Vipitis wants to merge 2 commits into
pygfx:mainfrom
Vipitis:promise-type
Open

fix GPUPromise type annotation#812
Vipitis wants to merge 2 commits into
pygfx:mainfrom
Vipitis:promise-type

Conversation

@Vipitis

@Vipitis Vipitis commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Little typing improvement that hands down the generic AwaitedType for GPUPromise to the subclasses.

I don't like that there is an edge case but couldn't find anything easier to read that handles BaseGPUPromise[AwaitedType] in that function with the existing logic.

before:
image

after:
image

LSP is way happier this way and shows fewer white method names and red squiggles

@Vipitis Vipitis changed the title Promise type fix GPUPromise type annotation Jun 10, 2026
@Vipitis Vipitis requested a review from almarklein June 14, 2026 16:57
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