Skip to content

Commit 8882c87

Browse files
Merge pull request #531 from robbievanleeuwen/dependency/pyright-1.1.396
Bump pyright from 1.1.389 to 1.1.396
2 parents 38c51b0 + 208a5a2 commit 8882c87

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ docs = [
7777
]
7878
lint = [
7979
"pre-commit==4.1.0",
80-
"pyright==1.1.389",
80+
"pyright==1.1.396",
8181
]
8282
test = [
8383
"pytest==8.3.5",

src/sectionproperties/pre/geometry.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,13 @@ def create_facets_and_control_points(self) -> None:
428428
)
429429

430430
if not self.assigned_control_point:
431-
self.control_points = list(self.geom.representative_point().coords)
431+
self.control_points = list(self.geom.representative_point().coords) # pyright: ignore [reportAttributeAccessIssue]
432432
else:
433-
self.control_points = list(self.assigned_control_point.coords)
433+
self.control_points = list(self.assigned_control_point.coords) # pyright: ignore [reportAttributeAccessIssue]
434434

435435
for hole in self.geom.interiors:
436436
hole_polygon = Polygon(hole)
437-
self.holes += tuple(hole_polygon.representative_point().coords)
437+
self.holes += tuple(hole_polygon.representative_point().coords) # pyright: ignore [reportOperatorIssue]
438438

439439
def compile_geometry(self) -> None:
440440
"""Alias for ``create_facets_and_control_points()``.
@@ -697,9 +697,10 @@ def shift_section(
697697
new_ctrl_point: tuple[float, float] | None = None
698698

699699
if self.assigned_control_point:
700-
new_ctrl_point = affinity.translate(
700+
new_ctrl_point_geom = affinity.translate(
701701
self.assigned_control_point, x_offset, y_offset
702-
).coords[0]
702+
)
703+
new_ctrl_point = new_ctrl_point_geom.x, new_ctrl_point_geom.y
703704

704705
return Geometry(
705706
geom=affinity.translate(self.geom, x_offset, y_offset),
@@ -751,12 +752,13 @@ def rotate_section(
751752
else:
752753
rotate_point = rot_point
753754

754-
new_ctrl_point = affinity.rotate(
755+
new_ctrl_point_geom = affinity.rotate(
755756
self.assigned_control_point,
756757
angle,
757758
rotate_point, # pyright: ignore [reportArgumentType]
758759
use_radians,
759-
).coords[0]
760+
)
761+
new_ctrl_point = new_ctrl_point_geom.x, new_ctrl_point_geom.y
760762

761763
return Geometry(
762764
geom=affinity.rotate(self.geom, angle, rot_point, use_radians), # pyright: ignore [reportArgumentType]
@@ -821,13 +823,14 @@ def mirror_section(
821823
new_ctrl_point: tuple[float, float] | None = None
822824

823825
if self.assigned_control_point:
824-
new_ctrl_point = affinity.scale(
826+
new_ctrl_point_geom = affinity.scale(
825827
self.assigned_control_point,
826828
xfact=y_mirror,
827829
yfact=x_mirror,
828830
zfact=1.0,
829831
origin=mirror_point, # pyright: ignore [reportArgumentType]
830-
).coords[0]
832+
)
833+
new_ctrl_point = new_ctrl_point_geom.x, new_ctrl_point_geom.y
831834

832835
return Geometry(
833836
geom=mirrored_geom,
@@ -1270,7 +1273,7 @@ def calculate_centroid(self) -> tuple[float, float]:
12701273
Returns:
12711274
Geometry centroid
12721275
"""
1273-
return self.geom.centroid.coords[0]
1276+
return self.geom.centroid.x, self.geom.centroid.y
12741277

12751278
@property
12761279
def recovery_points(self) -> list[tuple[float, float]] | list[Point]:
@@ -2443,7 +2446,7 @@ def compile_geometry(self) -> None:
24432446
for interior in poly.interiors:
24442447
rp: Point = Polygon(interior).representative_point()
24452448
coords = rp.coords[0]
2446-
resultant_holes.append(coords)
2449+
resultant_holes.append(coords) # pyright: ignore [reportArgumentType]
24472450

24482451
elif isinstance(unionized_poly, Polygon): # pyright: ignore [reportUnnecessaryIsInstance]
24492452
if Geometry(unionized_poly).holes:

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)