Repository navigation
bithuman: type-check against bithuman 2.11 - #7301
Merged
Merged
Conversation
bithuman 2.9.0 stubs AsyncBithuman as Any, so every call through the runtime went unchecked. 2.11.0 ships real types and surfaces eight errors in avatar.py. Pass the arguments to AsyncBithuman.create directly instead of through a dict, so the call keeps its types. Normalize _runtime to a single absent value in __init__, which fixes the runtime property: it tested `is None` only, so it returned NOT_GIVEN on the default path instead of raising BitHumanException. Drop two type: ignore comments that 2.11 makes unused. Lock bithuman at 2.11.0. The ignore removal requires it, because 2.9.0 needs the comment and 2.11.0 rejects it.
theomonnom
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
uv.lockpinsbithuman2.9.0, whose stub declaresAsyncBithuman: Any, so every call through the runtime is unchecked. Version 2.11.0 ships real types, so the next resolve failsmake checkwith eight errors inavatar.py.Fix: The call to
AsyncBithuman.createpasses its arguments directly, so 2.11 can check them, and__init__normalizes_runtimeto one absent value, which closes a hole in theruntimeproperty.uv.lockmoves to 2.11.0, which the two removedtype: ignorecomments require.Follows #7280.
Context for reviewing and coding agents