Skip to content

Commit

Permalink
Add stubs for django.contrib.postgres.expressions (#1765)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe authored Oct 31, 2023
1 parent da9784e commit ea4c068
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions django-stubs/contrib/postgres/expressions.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from typing import Any

from django.contrib.postgres.fields import ArrayField
from django.db.models import Subquery
from django.db.models.query import QuerySet
from django.db.models.sql.query import Query
from django.utils.functional import cached_property

class ArraySubquery(Subquery):
template: str

def __init__(self, queryset: Query | QuerySet[Any], **kwargs: Any) -> None: ...
@cached_property
def output_field(self) -> ArrayField: ...
1 change: 1 addition & 0 deletions scripts/stubtest/allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ django.contrib.gis.forms.BaseForm.changed_data
django.contrib.gis.forms.BaseFormSet.forms
django.contrib.gis.forms.BaseFormSet.management_form
django.contrib.gis.forms.BoundField.subwidgets
django.contrib.postgres.expressions.ArraySubquery.output_field
django.core.files.File.size
django.core.files.base.File.size
django.core.files.storage.FileSystemStorage.base_location
Expand Down

0 comments on commit ea4c068

Please sign in to comment.