Skip to content
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

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

Closed
andrew-womeldorf opened this issue Feb 9, 2024 · 4 comments
Assignees
Labels
🐞 bug Something isn't working 🎉 released Changes were included to the latest release 👋 response needed Awaiting response from a reporter

Comments

@andrew-womeldorf
Copy link

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 andrew-womeldorf added the 🐞 bug Something isn't working label Feb 9, 2024
@vemel
Copy link
Collaborator

vemel commented Feb 27, 2024

Hello!

Thank you for the bug report.

Sorry for the late response. I have finally found the issue when clashing type annotations were not renamed correctly. I am going to release a new version today or tomorrow.

@vemel vemel self-assigned this Feb 27, 2024
@andrew-womeldorf
Copy link
Author

No worries! Thank you for the response. Looking forward to removing my local overrides :)

@vemel
Copy link
Collaborator

vemel commented Feb 27, 2024

@andrew-womeldorf fixed in mypy-boto3-ec2 1.34.50. Please update and let me know if it works as it should.

This fix affects other services as well, so that was a good find. Thank you a lot!

@vemel vemel added 👋 response needed Awaiting response from a reporter 🎉 released Changes were included to the latest release labels Feb 27, 2024
@andrew-womeldorf
Copy link
Author

Fixed! Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🎉 released Changes were included to the latest release 👋 response needed Awaiting response from a reporter
Projects
None yet
Development

No branches or pull requests

2 participants