Closed pavlobielousov closed 1 month ago
Hello! Thank you for the report. I am currently working on optional keys in response StructureShapes. This looks related to #238
The issue has finally been fixed in mypy_boto3_builder 7.24.0
release. I have also released mypy-boto3-dynamodb 1.34.91
with the fix included. Please update and let me know if it works as expected.
Describe the bug The current TypedDict definition for the DynamoDB table
get_item()
methodGetItemOutputTableTypeDef
contains "Item" as a required key, however, this is not true. According to the AWS documentation:Currently,
mypy
reports any branch of code that questions the existence of the "Item" key as an unreachable code.To Reproduce Steps to reproduce the behavior:
boto3-stubs[dynamodb]
mypy
on the following code sampleActual output
Expected output
No
mypy
reported errors.Additional context Windows 11,
boto3-stubs
installatalled via pipenv,boto3
version 1.34.19