Skip to content

[5.0] Add missing stubs for geos #2034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions django-stubs/contrib/gis/geos/geometry.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class GEOSGeometryBase(GEOSBase):
def disjoint(self, other: GEOSGeometry) -> bool: ...
def equals(self, other: GEOSGeometry) -> bool: ...
def equals_exact(self, other: GEOSGeometry, tolerance: float = ...) -> bool: ...
def equals_identical(self, other: GEOSGeometry) -> bool: ...
def intersects(self, other: GEOSGeometry) -> bool: ...
def overlaps(self, other: GEOSGeometry) -> bool: ...
def relate_pattern(self, other: GEOSGeometry, pattern: str) -> bool: ...
Expand Down
2 changes: 2 additions & 0 deletions django-stubs/contrib/gis/geos/prototypes/io.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class _WKBReader(IOBase):
destructor: Any
def read(self, wkb: Any) -> Any: ...

def default_trim_value() -> bool: ...

class WKTWriter(IOBase):
ptr_type: Any
destructor: Any
Expand Down
35 changes: 18 additions & 17 deletions django-stubs/contrib/gis/geos/prototypes/predicates.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ class UnaryPredicate(GEOSFuncFactory):
class BinaryPredicate(UnaryPredicate):
argtypes: Any

geos_hasz: Any
geos_isclosed: Any
geos_isempty: Any
geos_isring: Any
geos_issimple: Any
geos_isvalid: Any
geos_contains: Any
geos_covers: Any
geos_crosses: Any
geos_disjoint: Any
geos_equals: Any
geos_equalsexact: Any
geos_intersects: Any
geos_overlaps: Any
geos_relatepattern: Any
geos_touches: Any
geos_within: Any
geos_hasz: UnaryPredicate
geos_isclosed: UnaryPredicate
geos_isempty: UnaryPredicate
geos_isring: UnaryPredicate
geos_issimple: UnaryPredicate
geos_isvalid: UnaryPredicate
geos_contains: BinaryPredicate
geos_covers: BinaryPredicate
geos_crosses: BinaryPredicate
geos_disjoint: BinaryPredicate
geos_equals: BinaryPredicate
geos_equalsexact: BinaryPredicate
geos_equalsidentical: BinaryPredicate
geos_intersects: BinaryPredicate
geos_overlaps: BinaryPredicate
geos_relatepattern: BinaryPredicate
geos_touches: BinaryPredicate
geos_within: BinaryPredicate
3 changes: 0 additions & 3 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ django.contrib.gis.forms.BoundField.template_name
django.contrib.gis.forms.ClearableFileInput.checked
django.contrib.gis.forms.Field.__init__
django.contrib.gis.forms.fields_for_model
django.contrib.gis.geos.geometry.GEOSGeometryBase.equals_identical
django.contrib.gis.geos.prototypes.io.DEFAULT_TRIM_VALUE
django.contrib.gis.geos.prototypes.io.default_trim_value
django.contrib.gis.geos.prototypes.predicates.geos_equalsidentical
django.contrib.gis.management
django.contrib.gis.management.commands
django.contrib.gis.management.commands.inspectdb
Expand Down