Skip to content

Commit

Permalink
Typehint SpatialOperator.as_sql as well
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed Jan 25, 2023
1 parent adb5fcf commit 1b320cc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion django-stubs/contrib/gis/db/backends/utils.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from collections.abc import Mapping, Sequence
from typing import Any

from django.contrib.gis.db.models.lookups import GISLookup
from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.models.sql.compiler import _AsSqlType

class SpatialOperator:
Expand All @@ -9,4 +12,10 @@ class SpatialOperator:
def __init__(self, op: Any | None = ..., func: Any | None = ...) -> None: ...
@property
def default_template(self) -> Any: ...
def as_sql(self, connection: Any, lookup: Any, template_params: Any, sql_params: Any) -> _AsSqlType: ...
def as_sql(
self,
connection: BaseDatabaseWrapper,
lookup: GISLookup,
template_params: Mapping[str, Any],
sql_params: Sequence[Any],
) -> _AsSqlType: ...

0 comments on commit 1b320cc

Please sign in to comment.