Opened 11 months ago
Closed 10 months ago
#35260 closed Bug (invalid)
request.GET is improperly type annotated
Description ¶
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.
Change History (2)
comment:1 by , 11 months ago
Component: | Uncategorized → HTTP handling |
---|
comment:2 by , 10 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the ticket, however, Django doesn't use type annotations and I'm not sure what is confusing them.