Skip to content

chore(event_handler): refactoring http methods to reduce code#8123

Closed
leandrodamascena wants to merge 2 commits intodevelopfrom
chore/generate-http-method-decorators
Closed

chore(event_handler): refactoring http methods to reduce code#8123
leandrodamascena wants to merge 2 commits intodevelopfrom
chore/generate-http-method-decorators

Conversation

@leandrodamascena
Copy link
Copy Markdown
Contributor

Issue number: closes #8119

Summary

Refactor event handler http methods.

Changes

Please provide a summary of what's being changed

User experience

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


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.

@leandrodamascena leandrodamascena requested a review from a team as a code owner April 7, 2026 08:17
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 7, 2026
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 7, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

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

See analysis details on SonarQube Cloud

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.63%. Comparing base (b8979e6) to head (1c6ac00).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8123   +/-   ##
========================================
  Coverage    96.63%   96.63%           
========================================
  Files          284      284           
  Lines        14105    14105           
  Branches      1162     1162           
========================================
  Hits         13630    13630           
  Misses         345      345           
  Partials       130      130           

☔ 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.

Comment on lines +893 to +898
get = _create_http_method.__func__("GET") # type: ignore[attr-defined]
post = _create_http_method.__func__("POST") # type: ignore[attr-defined]
put = _create_http_method.__func__("PUT") # type: ignore[attr-defined]
delete = _create_http_method.__func__("DELETE") # type: ignore[attr-defined]
patch = _create_http_method.__func__("PATCH") # type: ignore[attr-defined]
head = _create_http_method.__func__("HEAD") # type: ignore[attr-defined]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The issue mentions

Preserve type hints and docstrings for IDE support

Does this still work here despite the type: ignore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hey @phipag thanks for the review. The autocomplete works in some IDE, but it depends on the strict level checking. Thanks a lot for catching this, I think we should not merge this and confuse customers with the Developer Experience.

Thanks a lot

@leandrodamascena
Copy link
Copy Markdown
Contributor Author

Closing as not possible to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tech debt: Generate HTTP method decorators programmatically

2 participants