mypy_boto3_builder icon indicating copy to clipboard operation
mypy_boto3_builder copied to clipboard

ResponseMetadata attribute being added to EC2 TypeDefs where it doesn't belong

Open andrew-womeldorf opened this issue 6 months ago • 0 comments

Describe the bug ResponseMetadata is being added to the EC2 StateReasonTypeDef, but it shouldn't be there as far as I can tell.

To Reproduce Steps to reproduce the behavior:

  1. Install boto3-stubs[ec2]
  2. 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

andrew-womeldorf avatar Feb 09 '24 19:02 andrew-womeldorf