Skip to content

refactor(data_classes): Add base class with common code #6297

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

ericbn
Copy link
Contributor

@ericbn ericbn commented Mar 18, 2025

Issue number: #6293

Summary

Changes

This uses multiple inheritance, which is overly complex. I personally think is't not worth it, but here it is as an exercise and for us to see how it looks like. Alternatively, we can choose to keep only one of the base classes and repeat the code of the other. Or we can just disregard this altogether, as introducing any inheritance is always debatable in terms of benefit vs. complexity and maintability.

User experience

No user experience 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.

This uses multiple inheritance, which is overly complex.
@ericbn ericbn requested a review from a team as a code owner March 18, 2025 22:54
@ericbn ericbn requested a review from anafalcao March 18, 2025 22:54
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 18, 2025
@leandrodamascena leandrodamascena linked an issue Mar 19, 2025 that may be closed by this pull request
2 tasks
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.32%. Comparing base (aa343da) to head (e59e141).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6297      +/-   ##
===========================================
- Coverage    96.33%   96.32%   -0.01%     
===========================================
  Files          242      242              
  Lines        11699    11674      -25     
  Branches       864      864              
===========================================
- Hits         11270    11245      -25     
  Misses         336      336              
  Partials        93       93              

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 working on another PR @ericbn! APROVADO!

@leandrodamascena leandrodamascena merged commit 3e95ef0 into aws-powertools:develop Mar 19, 2025
12 checks passed
@ericbn ericbn deleted the add_cognito_base_classes branch March 19, 2025 14:03
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.

Tech debt: remove duplicated code in data class
2 participants