-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Add type-checking to Manager.acreate #2477
Add type-checking to Manager.acreate #2477
Conversation
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! One test suggestion
import asyncio | ||
from myapp.models import User | ||
async def amain() -> None: | ||
await User.objects.acreate(pk=1, name='Max', age=10) |
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.
await User.objects.acreate(pk=1, name='Max', age=10) | |
reveal_type(await User.objects.acreate(pk=1, name='Max', age=10)) |
Thanks @sobolevn! Any idea when this might go out in a release? |
We do releases every couple of month. I think that somewhere before / around the start of Feb. |
@flaeppe oh, I double checked. Our latest release was in Oct. So, maybe we can do one? |
That would be great since this issue caused us to miss a bug. I saw in the contributing docs that anybody can open the release PR - I'm happy to get that ball rolling if it would help. |
@vitosamson please, go ahead :) |
This PR adds type-checking to kwargs for the
.acreate()
method. Currently.create()
is type-checked but.acreate()
is not.Related issues
Closes #2090
This is my first time diving into this codebase so let me know if I missed anything. I used the test case from #2093.