Skip to content
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

Router refactor #1043

Merged
merged 4 commits into from
Nov 22, 2024
Merged

Router refactor #1043

merged 4 commits into from
Nov 22, 2024

Conversation

dave42w
Copy link
Contributor

@dave42w dave42w commented Nov 21, 2024

Description

This PR fixes #1044 builds on the earlier "Fix mypy warnings in router.py" #1038

Summary

This PR refactors def _format_response(self, res: Union[Dict, Response, bytes, tuple, str]) -> Response to reduce nesting and remove the two complicated formats to other functions _format_dict_response and _format_tuple_response

All tests pass (but I want to add unit tests to confirm more examples without needing a running server).

This should resolve these comments from @sansyrox : #1038 (comment) and #1038 (comment)

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2024 10:42pm

Copy link

codspeed-hq bot commented Nov 21, 2024

CodSpeed Performance Report

Merging #1043 will not alter performance

Comparing dave42w:router-refactor (714cd8a) with main (3f2e79a)

Summary

✅ 146 untouched benchmarks

Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

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

Hey @dave42w 👋

This looks great! ❇️

Thank you!

Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

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

LGTM!

@sansyrox sansyrox merged commit e79a01d into sparckles:main Nov 22, 2024
59 of 60 checks passed
@dave42w dave42w deleted the router-refactor branch November 22, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A logical bug in Robyn router.py headers
2 participants