Skip to content

Conversation

tiagohconte
Copy link
Contributor

Issue number: #6188

Summary

Changes

Added return type annotation for the capture_lambda_handler decorator.

User experience

A type error message Argument missing for parameter "context" was shown when using capture_lambda_handler with parameters.

Checklist

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

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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

@tiagohconte tiagohconte requested a review from a team as a code owner March 1, 2025 19:29
@boring-cyborg boring-cyborg bot added the tracer Tracer utility label Mar 1, 2025
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 1, 2025
Copy link

boring-cyborg bot commented Mar 1, 2025

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

Copy link

sonarqubecloud bot commented Mar 3, 2025

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (a1b5892) to head (23824f3).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6197   +/-   ##
========================================
  Coverage    96.25%   96.25%           
========================================
  Files          236      236           
  Lines        11407    11407           
  Branches       830      830           
========================================
  Hits         10980    10980           
  Misses         337      337           
  Partials        90       90           

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

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.

Thanks a lot for sending this PR @tiagohconte! APPROVED!

@leandrodamascena leandrodamascena merged commit 88ef500 into aws-powertools:develop Mar 3, 2025
12 checks passed
Copy link

boring-cyborg bot commented Mar 3, 2025

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

@tiagohconte tiagohconte deleted the refactor/handler-tracer-typing branch March 6, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. tracer Tracer utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static typing: Argument missing for parameter "context" when using @tracer.capture_lambda_handler(capture_response=False)
2 participants