mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-02-22 09:38:59 +08:00
Fix QuerySet.create and Manager.create annotation since it doesn't accept *args (only **kwargs) (#762)
This commit is contained in:
@@ -371,8 +371,8 @@
|
||||
from django.db import models
|
||||
class MyModelManager(models.Manager):
|
||||
|
||||
def create(self, *args, **kwargs) -> 'MyModel':
|
||||
return super().create(*args, **kwargs)
|
||||
def create(self, **kwargs) -> 'MyModel':
|
||||
return super().create(**kwargs)
|
||||
|
||||
|
||||
class MyModel(models.Model):
|
||||
@@ -392,8 +392,8 @@
|
||||
from django.db import models
|
||||
class MyModelManager(models.Manager['MyModel']):
|
||||
|
||||
def create(self, *args, **kwargs) -> 'MyModel':
|
||||
return super().create(*args, **kwargs)
|
||||
def create(self, **kwargs) -> 'MyModel':
|
||||
return super().create(**kwargs)
|
||||
|
||||
class MyModel(models.Model):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user