Skip to content

Commit e2c8906

Browse files
authored
[5.0] Add missing stubs for geos (#2034)
1 parent 34a3c63 commit e2c8906

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

django-stubs/contrib/gis/geos/geometry.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class GEOSGeometryBase(GEOSBase):
6060
def disjoint(self, other: GEOSGeometry) -> bool: ...
6161
def equals(self, other: GEOSGeometry) -> bool: ...
6262
def equals_exact(self, other: GEOSGeometry, tolerance: float = ...) -> bool: ...
63+
def equals_identical(self, other: GEOSGeometry) -> bool: ...
6364
def intersects(self, other: GEOSGeometry) -> bool: ...
6465
def overlaps(self, other: GEOSGeometry) -> bool: ...
6566
def relate_pattern(self, other: GEOSGeometry, pattern: str) -> bool: ...

django-stubs/contrib/gis/geos/prototypes/io.pyi

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class _WKBReader(IOBase):
7373
destructor: Any
7474
def read(self, wkb: Any) -> Any: ...
7575

76+
def default_trim_value() -> bool: ...
77+
7678
class WKTWriter(IOBase):
7779
ptr_type: Any
7880
destructor: Any

django-stubs/contrib/gis/geos/prototypes/predicates.pyi

+18-17
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@ class UnaryPredicate(GEOSFuncFactory):
1010
class BinaryPredicate(UnaryPredicate):
1111
argtypes: Any
1212

13-
geos_hasz: Any
14-
geos_isclosed: Any
15-
geos_isempty: Any
16-
geos_isring: Any
17-
geos_issimple: Any
18-
geos_isvalid: Any
19-
geos_contains: Any
20-
geos_covers: Any
21-
geos_crosses: Any
22-
geos_disjoint: Any
23-
geos_equals: Any
24-
geos_equalsexact: Any
25-
geos_intersects: Any
26-
geos_overlaps: Any
27-
geos_relatepattern: Any
28-
geos_touches: Any
29-
geos_within: Any
13+
geos_hasz: UnaryPredicate
14+
geos_isclosed: UnaryPredicate
15+
geos_isempty: UnaryPredicate
16+
geos_isring: UnaryPredicate
17+
geos_issimple: UnaryPredicate
18+
geos_isvalid: UnaryPredicate
19+
geos_contains: BinaryPredicate
20+
geos_covers: BinaryPredicate
21+
geos_crosses: BinaryPredicate
22+
geos_disjoint: BinaryPredicate
23+
geos_equals: BinaryPredicate
24+
geos_equalsexact: BinaryPredicate
25+
geos_equalsidentical: BinaryPredicate
26+
geos_intersects: BinaryPredicate
27+
geos_overlaps: BinaryPredicate
28+
geos_relatepattern: BinaryPredicate
29+
geos_touches: BinaryPredicate
30+
geos_within: BinaryPredicate

scripts/stubtest/allowlist_todo_django50.txt

-3
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ django.contrib.gis.forms.BoundField.template_name
3333
django.contrib.gis.forms.ClearableFileInput.checked
3434
django.contrib.gis.forms.Field.__init__
3535
django.contrib.gis.forms.fields_for_model
36-
django.contrib.gis.geos.geometry.GEOSGeometryBase.equals_identical
3736
django.contrib.gis.geos.prototypes.io.DEFAULT_TRIM_VALUE
38-
django.contrib.gis.geos.prototypes.io.default_trim_value
39-
django.contrib.gis.geos.prototypes.predicates.geos_equalsidentical
4037
django.contrib.gis.management
4138
django.contrib.gis.management.commands
4239
django.contrib.gis.management.commands.inspectdb

0 commit comments

Comments
 (0)