From fa96e7967c3fc0b406613d153bd37bb7fc5ddfe0 Mon Sep 17 00:00:00 2001 From: Ali Hamdan Date: Sat, 1 Jun 2024 11:08:05 +0200 Subject: [PATCH] Update shapely enums --- stubs/shapely/shapely/_geometry.pyi | 6 +++--- stubs/shapely/shapely/constructive.pyi | 12 ++++++------ stubs/shapely/shapely/strtree.pyi | 18 +++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/stubs/shapely/shapely/_geometry.pyi b/stubs/shapely/shapely/_geometry.pyi index ced166049715..5f18335330b2 100644 --- a/stubs/shapely/shapely/_geometry.pyi +++ b/stubs/shapely/shapely/_geometry.pyi @@ -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: ... diff --git a/stubs/shapely/shapely/constructive.pyi b/stubs/shapely/shapely/constructive.pyi index 603ba36bc651..55ceab3c7dcc 100644 --- a/stubs/shapely/shapely/constructive.pyi +++ b/stubs/shapely/shapely/constructive.pyi @@ -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: ... diff --git a/stubs/shapely/shapely/strtree.pyi b/stubs/shapely/shapely/strtree.pyi index 45f1b8e65cc2..d43291c78e1f 100644 --- a/stubs/shapely/shapely/strtree.pyi +++ b/stubs/shapely/shapely/strtree.pyi @@ -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: ...