Skip to content

refactor(parameters): improve typing for get_secret method #3910

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

Conversation

TonySherman
Copy link
Contributor

Issue number:
#3909

Summary

Changes

Adds overloads to get_secret, very similar to #3534

Please provide a summary of what's being changed

User experience

Type checkers should return the expected type based on the value in the transform argument.

If None, return type should be str
If "json", return type should be dict
If "binary", return type should be bytes
If "auto", return type should be bytes

Please share what the user experience looks like before and after this change

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.

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

@TonySherman TonySherman requested a review from a team March 7, 2024 20:31
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 7, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.35%. Comparing base (e14e768) to head (90bb5f0).
Report is 138 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3910      +/-   ##
===========================================
- Coverage    96.38%   96.35%   -0.03%     
===========================================
  Files          214      214              
  Lines        10030    10126      +96     
  Branches      1846     1873      +27     
===========================================
+ Hits          9667     9757      +90     
- Misses         259      265       +6     
  Partials       104      104              

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

@leandrodamascena leandrodamascena linked an issue Mar 8, 2024 that may be closed by this pull request
Copy link

sonarqubecloud bot commented Mar 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

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 for helping us improve the developer experience by adding these overloads and typing autocomplete in the IDE @TonySherman!

APPROVED!

@leandrodamascena leandrodamascena changed the title refactor(parameters): add overloads for get_secret refactor(parameters): improve typing for get_secret method Mar 8, 2024
@leandrodamascena leandrodamascena merged commit 1b4a57e into aws-powertools:develop Mar 8, 2024
@TonySherman TonySherman deleted the fix/overload-get-secrets branch March 8, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static typing: parameters get_secret
3 participants