Skip to content
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

Update shapely enums #12078

Merged
merged 1 commit into from
Jun 1, 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
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