You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a PR that changes the type to typing.Union[typing.Sequence[int], bytes] but I'm neither sure that this will not have unwanted consequences for other classes nor that this is exhaustive for all the possible values shown above or what else might be legal to pass. I hope someone more knowledgeable can figure out what the maximal type annotation would be.
The text was updated successfully, but these errors were encountered:
Still your question is valid if we cannot simply type it as bytes, i will think about that. Currently this may be confusing, but it will not yield any type errors.
The type annotation for
GLib.Bytes.new()
input argumentdata
is confusingly narrow:Sequence[int]
.pygobject-stubs/src/gi-stubs/repository/GLib.pyi
Line 1425 in a576d99
Yet the following code works without a problem:
I think the type annotation should reflect this.
I made a PR that changes the type to
typing.Union[typing.Sequence[int], bytes]
but I'm neither sure that this will not have unwanted consequences for other classes nor that this is exhaustive for all the possible values shown above or what else might be legal to pass. I hope someone more knowledgeable can figure out what the maximal type annotation would be.The text was updated successfully, but these errors were encountered: