Closed kgriffs closed 2 years ago
Merging #2108 (d9698c3) into master (5d1b1cb) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #2108 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 62 62
Lines 6746 6759 +13
Branches 1255 1255
=========================================
+ Hits 6746 6759 +13
Impacted Files | Coverage Δ | |
---|---|---|
falcon/asgi/response.py | 100.00% <ø> (ø) |
|
falcon/asgi/app.py | 100.00% <100.00%> (ø) |
|
falcon/http_error.py | 100.00% <100.00%> (ø) |
|
falcon/http_status.py | 100.00% <100.00%> (ø) |
|
falcon/response.py | 100.00% <100.00%> (ø) |
|
falcon/util/misc.py | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
considering typing, I think it would be nicer if
status
had a narrower type, but there has always been the possibility of setting multiple types so nothing new here.for the rest it seems ok
Ideally we would have added status_code
before this and left status
alone, but I'd like to just keep the consistency for now and avoid breaking changes; we can consider changing things up in the next major release.
The main issue I see is that necessarly status
has type int | str | HTTPStatus
, but usually only one of these is used in application.
But at worst we can add a status_str
that does the same as status_code
but always returns the string
This patch adds a status_code attribute (property) to the Response, HTTPError, and HTTPStatus classes to afford introspection by middleware and error handlers.