-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
S3 ListObjectsV2OutputTypeDef Contents key should be NotRequired #242
Comments
Unfortunately, |
A similar issue happens with the key I can open an issue if you want to keep track of both bugs separately --> done here #248 |
The issue has finally been fixed in |
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: