mypy_boto3_builder
mypy_boto3_builder copied to clipboard
ResponseMetadata attribute being added to EC2 TypeDefs where it doesn't belong
Describe the bug
ResponseMetadata
is being added to the EC2 StateReasonTypeDef
, but it shouldn't be there as far as I can tell.
-
AWS API Docs only show
code
andmessage
fields -
Boto3 v1.34.38 Docs also only shows Code and Message as fields under
StateReason
.
To Reproduce Steps to reproduce the behavior:
- Install
boto3-stubs[ec2]
- Run
mypy
/pyright
on the following code sample
from mypy_boto3_ec2.type_defs import StateReasonTypeDef
reason: StateReasonTypeDef = {"Code": "0", "Message": "test"}
Actual output
$ poetry run pyright
<path>/main.py
<path>/main.py:2:30 - error: Expression of type "dict[str, str]" cannot be assigned to declared type "StateReasonTypeDef"
"ResponseMetadata" is required in "StateReasonTypeDef" (reportAssignmentType)
1 error, 0 warnings, 0 informations
Additional context
Your OS, boto3-stubs
installation method, boto3
version, etc.
boto3-stubs 1.34.38