Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixiong-tang committed Oct 3, 2024
1 parent 266fd41 commit b39d75f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/geobuf/pybind11_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ inline geojson_value to_geojson_value(const py::handle &obj)
#define BIND_PY_FLUENT_ATTRIBUTE(Klass, type, var) \
.def( \
#var, [](Klass &self) -> type & { return self.var; }, \
rvp::reference_internal) \
rvp::reference_internal, "Get the '" #var "' attribute") \
.def( \
#var, \
[](Klass &self, const type &v) -> Klass & { \
self.var = v; \
return self; \
}, \
rvp::reference_internal)
rvp::reference_internal, "Set the '" #var "' attribute")
#endif
40 changes: 30 additions & 10 deletions src/pybind11_geobuf/_core/geojson.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ class Feature:
"""
@typing.overload
def custom_properties(self) -> value.object_type:
...
"""
Get the 'custom_properties' attribute
"""
@typing.overload
def custom_properties(self, arg0: value.object_type) -> Feature:
...
"""
Set the 'custom_properties' attribute
"""
def deduplicate_xyz(self) -> bool:
"""
Remove duplicate consecutive points based on their XYZ coordinates
Expand All @@ -103,10 +107,14 @@ class Feature:
"""
@typing.overload
def geometry(self) -> Geometry:
...
"""
Get the 'geometry' attribute
"""
@typing.overload
def geometry(self, arg0: Geometry) -> Feature:
...
"""
Set the 'geometry' attribute
"""
@typing.overload
def geometry(self, point: Point) -> Feature:
"""
Expand Down Expand Up @@ -166,10 +174,14 @@ class Feature:
"""
@typing.overload
def properties(self) -> value.object_type:
...
"""
Get the 'properties' attribute
"""
@typing.overload
def properties(self, arg0: value.object_type) -> Feature:
...
"""
Set the 'properties' attribute
"""
@typing.overload
def properties(self, arg0: typing.Any) -> Feature:
"""
Expand Down Expand Up @@ -280,10 +292,14 @@ class FeatureCollection(FeatureList):
"""
@typing.overload
def custom_properties(self) -> value.object_type:
...
"""
Get the 'custom_properties' attribute
"""
@typing.overload
def custom_properties(self, arg0: value.object_type) -> FeatureCollection:
...
"""
Set the 'custom_properties' attribute
"""
def deduplicate_xyz(self) -> bool:
"""
Remove duplicate consecutive points based on their XYZ coordinates
Expand Down Expand Up @@ -689,10 +705,14 @@ class Geometry(GeometryBase):
"""
@typing.overload
def custom_properties(self) -> ...:
...
"""
Get the 'custom_properties' attribute
"""
@typing.overload
def custom_properties(self, arg0: ..., std: ..., std: ..., mapbox: ..., std: ..., std: ..., std: ..., std: ..., std: ..., std: ..., std: ..., std: ..., std: ..., mapbox: ...) -> Geometry:
...
"""
Set the 'custom_properties' attribute
"""
def deduplicate_xyz(self) -> bool:
"""
Remove duplicate consecutive points based on their XYZ coordinates
Expand Down

0 comments on commit b39d75f

Please sign in to comment.