Skip to content

Commit b019e98

Browse files
authored
Update shapely enums (#12078)
1 parent 124d020 commit b019e98

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

stubs/shapely/shapely/_geometry.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ def get_precision(geometry: Geometry | None, **kwargs) -> float: ...
162162
def get_precision(geometry: OptGeoArrayLikeSeq, **kwargs) -> NDArray[np.float64]: ...
163163

164164
class SetPrecisionMode(ParamEnum):
165-
valid_output: int
166-
pointwise: int
167-
keep_collapsed: int
165+
valid_output = 0 # noqa: Y052
166+
pointwise = 1 # noqa: Y052
167+
keep_collapsed = 2 # noqa: Y052
168168

169169
@overload
170170
def set_precision(geometry: OptGeoT, grid_size: float, mode: _PrecisionMode = "valid_output", **kwargs) -> OptGeoT: ...

stubs/shapely/shapely/constructive.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ __all__ = [
3939
]
4040

4141
class BufferCapStyle(ParamEnum):
42-
round: int
43-
flat: int
44-
square: int
42+
round = 1 # noqa: Y052
43+
flat = 2 # noqa: Y052
44+
square = 3 # noqa: Y052
4545

4646
class BufferJoinStyle(ParamEnum):
47-
round: int
48-
mitre: int
49-
bevel: int
47+
round = 1 # noqa: Y052
48+
mitre = 2 # noqa: Y052
49+
bevel = 3 # noqa: Y052
5050

5151
@overload
5252
def boundary(geometry: Point | MultiPoint, **kwargs) -> GeometryCollection: ...

stubs/shapely/shapely/strtree.pyi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ _BinaryPredicate: TypeAlias = Literal[
1515
]
1616

1717
class BinaryPredicate(ParamEnum):
18-
intersects: int
19-
within: int
20-
contains: int
21-
overlaps: int
22-
crosses: int
23-
touches: int
24-
covers: int
25-
covered_by: int
26-
contains_properly: int
18+
intersects = 1 # noqa: Y052
19+
within = 2 # noqa: Y052
20+
contains = 3 # noqa: Y052
21+
overlaps = 4 # noqa: Y052
22+
crosses = 5 # noqa: Y052
23+
touches = 6 # noqa: Y052
24+
covers = 7 # noqa: Y052
25+
covered_by = 8 # noqa: Y052
26+
contains_properly = 9 # noqa: Y052
2727

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

0 commit comments

Comments
 (0)