S3 ListObjectsV2OutputTypeDef Contents key should be NotRequired #242
Labels
🐞 bug
Something isn't working
🎉 released
Changes were included to the latest release
👋 response needed
Awaiting response from a reporter
Describe the bug
ListObjectsV2OutputTypeDef
is aTypedDict
which specifies theContents
key asList[ObjectTypeDef]
but the API can return a response without this key. Can we please change this toNotRequired[List[ObjectTypeDef]]
?To Reproduce
Steps to reproduce the behavior:
boto3
andboto3-stubs[s3]
andpyright
pyright
on the following code sample:Actual output
Expected output
If I manually change
type_defs.pyi
to useNotRequired[List[ObjectTypeDef]]
then it does what I was expecting:Additional context
Using macOS 14.2.1, Python 3.11.2, Poetry (version 1.4.2) for managing dependencies, boto3 1.34.23, boto3-stubs 1.34.23.
I printed the
page
dictionary and got the following. You can see that there is noContents
key.The text was updated successfully, but these errors were encountered: