feat(request): add arg `allow_multiple` to `get_param` & friends #2731
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 335 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.348
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2731"
general
weight: 0.35
warsaw
Summary of Changes
This adds an optional argument
singletoRequest.get_param.When this argument is set to True, get_param will raise an exception if the requested parameter has multiple values. This turns the undefined behavior (what value is returned) into an error.
The inspiration for this was a LLM assisted migration to falcon4 of another codebase. This codebase tries to be strict and for that reason the LLM noted that the
get_parambehaviour of returning a value at will was troublesome and it suggested a large helper function.I declined and wrote this instead.
Related Issues
Fixes #2735.
Pull Request Checklist
tox.- [x] Added docstrings for any new classes, functions, or modules.
- [x] Updated docstrings for any modifications to existing code.
- [x] Updated both WSGI and ASGI docs (where applicable).
- [x] Added references to new classes, functions, or modules to the relevant RST file under
docs/.- [x] Updated all relevant supporting documentation files under
docs/.- [x] A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
- [ ] Changed/added classes/methods/functions have appropriate
versionadded,versionchanged, ordeprecateddirectives.docs/_newsfragments/, with the file name format{issue_number}.{fragment_type}.rst. (Runtox -e docs, and inspectdocs/_build/html/changes/in the browser to ensure it renders correctly.)If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template inspired by the attrs project.