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
Inaccurate typing for body/query argument getters #3336
Comments
pcavalar
added a commit
to pcavalar/tornado
that referenced
this issue
May 17, 2024
Use the same overload technique as get_argument(). Fixes tornadoweb#3336
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The return type of
RequestHandler.get_argument
depends on adefault
being provided or not, accounted for using appropriate overloads. Unfortunately, the same isn't true forRequestHandler.get_body_argument
andRequestHandler.get_query_argument
, which simply declareOptional[str]
.Perhaps those need similar overloads, or they could be moved over to
RequestHandler._get_argument
, called by all...? I'm not sure if most type checkers would infer the rest from that.The text was updated successfully, but these errors were encountered: