#35260: request.GET is improperly type annotated
-----------------------------------------+------------------------
Reporter: Yidi Sprei | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
request.GET does not appear to have proper type hints. If you put () after
request.GET, it raises an error (TypeError: 'QueryDict' object is not
callable) because it is not supposed to be called. So the only way it
works is to have it without calling it and accessing the dictionary that
way. However, typecheckers seem to think that it lacks an instantiation
which makes sense intuitively. This should be pretty easily fixable for
typecheckers by just adding better type-annotations. Or if possible to
make request.GET have a callable that returns the dictionary as well so
that devs can opt for the more pythonic option.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35260>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.