django-types icon indicating copy to clipboard operation
django-types copied to clipboard

:doughnut: Type stubs for Django

Results 68 django-types issues
Sort by recently updated
recently updated
newest added

In Django 3.1, `django.utils.decorators.classproperty` got moved to `django.utils.functional.classproperty`, so the location of the stub here needs updating too. It seems like this fork is a long way behind `django-stubs` for...

bug

I have a django query where I'm splitting a string and getting a part of it in an ORM query. I get an error which says, ``` Argument of type...

bug

Hi, Django allow you to define in your class the manager you want to use as default when using objects. This can be useful for adding new methods to your...

enhancement

Here: https://github.com/sbdchd/django-types/blob/main/django-stubs/forms/fields.pyi#L30 The confusion is that `BaseValidator` is not actually the base class of all validators, nor describing the Protocol which custom validators have to satisfy. Instead it seems to...

bug

The function returns a dictionary, not a set. Values are instances of the Migration model declared in the class - not sure if / how we can re-use that type...

pyright fixed how the resolve metaclass attributes in 1.1.324, which causes issues with the way `MyModel.objects` is declared here. In short, `MyModel.objects` will still be resolved as `BaseManager[MyModel]` even if...

Hello, trying to type a return of `values_list`, I stumbled upon `ValuesQuerySet`, which is still part of django-types, but has been removed in django 1.9. Is there a reason this...

While I get this isn't technically accurate: ```python class ModelAQuerySet(models.QuerySet["ModelA"]): def custom_method(self) -> Self: ... class ModelA(models.Model): objects: ModelAQuerySet = ModelAQuerySet.as_manager() # Pyright: Manager cannot be assigned to queryset ```...

Hi! I'm one of the maintainers of the django-stubs project. I sense that there is significant duplication of effort between django-stubs and django-types. Our pace of development has picked up...

In the README.md file, there is this section: > You can get a `TypeError: 'type' object is not subscriptable` > when you will try to use `QuerySet[MyModel]`, `Manager[MyModel]` or some...