-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
add handler name to request as endpoint #1445
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1445 +/- ##
=========================================
+ Coverage 91.32% 91.43% +0.1%
=========================================
Files 17 17
Lines 1718 1728 +10
Branches 322 324 +2
=========================================
+ Hits 1569 1580 +11
Misses 123 123
+ Partials 26 25 -1
Continue to review full report at Codecov.
|
@@ -454,6 +454,13 @@ def websocket( | |||
def response(handler): | |||
async def websocket_handler(request, *args, **kwargs): | |||
request.app = self | |||
if not getattr(handler, "__blueprintname__", False): |
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.
Maybe these two if/else
chunks can be refactored into a method?
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.
I actually like the if/else for clarity of reading. I think it's a simple enough logic branch that it doesn't necessarily require moving it to its own method... with that being said, perhaps it's worth revisiting if we do end up adding more complexity here.
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.
@sjsadowski Looking back at the comment, I see how my message was a bit confusing. I suggested the refactoring because we can re-use what we do in and around line#457 and carry it over to line#898
This PR replaces #979 which implements #977.