Skip to content

Commit

Permalink
Update shapely enums (python#12078)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdanal authored and max-muoto committed Sep 8, 2024
1 parent 72e24b2 commit 3c1f8b2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions stubs/shapely/shapely/_geometry.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ def get_precision(geometry: Geometry | None, **kwargs) -> float: ...
def get_precision(geometry: OptGeoArrayLikeSeq, **kwargs) -> NDArray[np.float64]: ...

class SetPrecisionMode(ParamEnum):
valid_output: int
pointwise: int
keep_collapsed: int
valid_output = 0 # noqa: Y052
pointwise = 1 # noqa: Y052
keep_collapsed = 2 # noqa: Y052

@overload
def set_precision(geometry: OptGeoT, grid_size: float, mode: _PrecisionMode = "valid_output", **kwargs) -> OptGeoT: ...
Expand Down
12 changes: 6 additions & 6 deletions stubs/shapely/shapely/constructive.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ __all__ = [
]

class BufferCapStyle(ParamEnum):
round: int
flat: int
square: int
round = 1 # noqa: Y052
flat = 2 # noqa: Y052
square = 3 # noqa: Y052

class BufferJoinStyle(ParamEnum):
round: int
mitre: int
bevel: int
round = 1 # noqa: Y052
mitre = 2 # noqa: Y052
bevel = 3 # noqa: Y052

@overload
def boundary(geometry: Point | MultiPoint, **kwargs) -> GeometryCollection: ...
Expand Down
18 changes: 9 additions & 9 deletions stubs/shapely/shapely/strtree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ _BinaryPredicate: TypeAlias = Literal[
]

class BinaryPredicate(ParamEnum):
intersects: int
within: int
contains: int
overlaps: int
crosses: int
touches: int
covers: int
covered_by: int
contains_properly: int
intersects = 1 # noqa: Y052
within = 2 # noqa: Y052
contains = 3 # noqa: Y052
overlaps = 4 # noqa: Y052
crosses = 5 # noqa: Y052
touches = 6 # noqa: Y052
covers = 7 # noqa: Y052
covered_by = 8 # noqa: Y052
contains_properly = 9 # noqa: Y052

class STRtree:
def __init__(self, geoms: GeoArrayLikeSeq, node_capacity: SupportsIndex = 10) -> None: ...
Expand Down

0 comments on commit 3c1f8b2

Please sign in to comment.