Skip to content

Commit

Permalink
Fix overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Jun 30, 2024
1 parent 51bad65 commit 73353a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion django-stubs/contrib/gis/db/models/aggregates.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.models import Aggregate
from django.db.models import Aggregate, Expression
from django.db.models.sql.compiler import SQLCompiler, _AsSqlType

class GeoAggregate(Aggregate):
Expand All @@ -15,10 +15,12 @@ class Collect(GeoAggregate):
class Extent(GeoAggregate):
name: str
def __init__(self, expression: Any, **extra: Any) -> None: ...
def convert_value(self, value: Any, expression: Expression, connection: BaseDatabaseWrapper) -> Any: ...

class Extent3D(GeoAggregate):
name: str
def __init__(self, expression: Any, **extra: Any) -> None: ...
def convert_value(self, value: Any, expression: Expression, connection: BaseDatabaseWrapper) -> Any: ...

class MakeLine(GeoAggregate):
name: str
Expand Down
3 changes: 2 additions & 1 deletion django-stubs/db/models/functions/datetime.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, ClassVar
from django.db import models
from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.models import Func, Transform
from django.db.models.expressions import Combinable
from django.db.models.expressions import Combinable, Expression
from django.db.models.fields import Field
from django.db.models.sql.compiler import SQLCompiler, _AsSqlType

Expand Down Expand Up @@ -44,6 +44,7 @@ class TruncBase(TimezoneMixin, Transform):
self, expression: Combinable | str, output_field: Field | None = ..., tzinfo: tzinfo | None = ..., **extra: Any
) -> None: ...
def as_sql(self, compiler: SQLCompiler, connection: BaseDatabaseWrapper) -> _AsSqlType: ... # type: ignore[override]
def convert_value(self, value: Any, expression: Expression, connection: BaseDatabaseWrapper) -> Any: ...

class Trunc(TruncBase):
def __init__(
Expand Down

0 comments on commit 73353a9

Please sign in to comment.