File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ def plotting_context(
9393 ax .set_aspect ("equal" , anchor = "C" )
9494
9595 if filename and fig :
96- fig .savefig (filename , dpi = fig .dpi )
97- plt .close (fig ) # close the figure to free the memory
96+ fig .savefig (filename , dpi = fig .dpi ) # pyright: ignore
97+ plt .close (fig ) # pyright: ignore # close the figure to free the memory
9898 return # if the figure was to be saved, then don't show it also
9999
100100 if render :
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def __init__(
5656
5757 for hole in self .geom .interiors :
5858 hole_polygon = Polygon (hole )
59- self .holes += tuple (hole_polygon .representative_point ().coords )
59+ self .holes += tuple (hole_polygon .representative_point ().coords ) # pyright: ignore [reportOperatorIssue]
6060
6161 def round_geometry (
6262 self ,
@@ -103,7 +103,8 @@ def create_points_and_facets(
103103 # perimeter, note in shapely last point == first point
104104 if geometry .exterior :
105105 for coords in list (geometry .exterior .coords [:- 1 ]):
106- points .append (coords )
106+ x , y = list (coords )
107+ points .append ((x , y ))
107108 master_count += 1
108109
109110 facets += self .create_facets (points )
@@ -156,7 +157,7 @@ def calculate_centroid(self) -> tuple[float, float]:
156157 Returns:
157158 Geometry centroid
158159 """
159- return self .geom .centroid .coords [ 0 ]
160+ return self .geom .centroid .x , self . geom . centroid . y
160161
161162 def calculate_extents (self ) -> tuple [float , float , float , float ]:
162163 """Calculates the extents of the geometry.
You can’t perform that action at this time.
0 commit comments