-
Notifications
You must be signed in to change notification settings - Fork 403
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
refactor(typing): reduce aws_lambda_powertools.shared.types usage #4896
refactor(typing): reduce aws_lambda_powertools.shared.types usage #4896
Conversation
As discussed in aws-powertools#4607. This simplifies linting and refactoring so we can introduce from __future__ import annotations to all files, which is the plan as the next step.
Reviewing now. |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ericbn I did some changes here.
- I fixed the documentation, some highlights were wrong because we changed imports.
- I removed JSONType from shared and moved it to Feature Flags, makes more sense.
- I fixed absolute imports in Feature Flags - unrelated, but always good.
Can you please take a look before we approve and merge?
Oi @leandrodamascena. All looking good to me. Good catch on the absolute imports and good to know about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPROVED! @ericbn 🥇
Olá :D |
Issue number: #4897
Summary
Changes
Reduce
aws_lambda_powertools.shared.types
usage. The goal was to remove the package as a whole, but the customAnyCallableT
andJSONType
defined there cannot be replaced by any type provided in typing or typing_extensions.User experience
As discussed in #4607, this is an intermediary step towards adding
from __future__ import annotations
to all files. The refactoring in this PR will help ruff better help us refactor the code once we introduce the TCH and UP rules as discussed in the main issue.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
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.