-
-
Notifications
You must be signed in to change notification settings - Fork 133
Accept lazy strings as path in APIRequestFactory and APIClient http methods
#825
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
Accept lazy strings as path in APIRequestFactory and APIClient http methods
#825
Conversation
|
Thanks! You are correct, paths can be lazy. |
|
Thanks for the comments, super helpful! |
|
The stubtest failure seems unrelated... AFAIK it happens on other branches. Seems like an easy fix though |
intgr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
djangorestframework-stubs Release notes: https://github.com/typeddjango/djangorestframework-stubs/releases/tag/3.16.3 |
I have made things!
I received and update for mypy 1.17.1 -> 1.18.1 and started to see some failures pointing at code like this in my tests:
The error message was:
The code runs fine and the type check was ok with it in previous versions. Therefore we can probably safely accept lazy strings as path.
Note: while running the tests it seems like we also need to update the base client class in django-stubs. I'll try to do that at some point when I have more timeEDIT: it was due to a suppression comment being on the wrong place.Related issues