Skip to content

refactor(batch): type response() method #3023

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

Merged
merged 2 commits into from
Aug 29, 2023
Merged

refactor(batch): type response() method #3023

merged 2 commits into from
Aug 29, 2023

Conversation

adriantomas
Copy link
Contributor

Issue number: #3020

Summary

Changes

  • Use PartialItemFailureReponse as the typing returned by response() of BasePartialBatchProcessor

User experience

Users using process_partial_response() and response() from BasePartialBatchProcessor will find that the returned response is the same.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@adriantomas adriantomas requested a review from a team August 29, 2023 06:29
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 29, 2023

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 29, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (a884d9f) 96.56% compared to head (aa87ea6) 96.56%.
Report is 2 commits behind head on develop.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3023   +/-   ##
========================================
  Coverage    96.56%   96.56%           
========================================
  Files          175      175           
  Lines         7825     7825           
  Branches      1476     1476           
========================================
  Hits          7556     7556           
  Misses         217      217           
  Partials        52       52           
Files Changed Coverage Δ
aws_lambda_powertools/utilities/batch/base.py 94.21% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leandrodamascena leandrodamascena changed the title style: use same response typing for batch processor response and process_partial_response refactor(batch): add type annotation in response method Aug 29, 2023
@leandrodamascena leandrodamascena self-requested a review August 29, 2023 07:37
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were so fast @adriantomas! Thanks a lot for this PR and your first contribution.

LGTM

@leandrodamascena leandrodamascena changed the title refactor(batch): add type annotation in response method refactor(batch): type response() method Aug 29, 2023
@leandrodamascena leandrodamascena merged commit 2cac2b5 into aws-powertools:develop Aug 29, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 29, 2023

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

@adriantomas adriantomas deleted the adriantomas/batch-processor-response-typing branch August 29, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
3 participants