Skip to content

Commit 9baf1e1

Browse files
Fix minor bugs
1 parent 72c60c5 commit 9baf1e1

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: uv python install 3.12
5454

5555
- name: Install dependencies
56-
run: uv sync -p 3.12 --frozen
56+
run: uv sync -p 3.12 --frozen --all-extras
5757

5858
- name: Run pyright
5959
run: uv run -p 3.12 pyright

src/sectionproperties/post/post.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,8 @@ def calculate_centroidal_properties(
278278
else:
279279
self.phi = np.arctan2(self.ixx_c - self.i11_c, self.ixy_c) * 180 / np.pi
280280

281-
# initialise min, max variables
282-
if self.phi:
281+
# initialise min, max variables TODO: check for `if xxx:` where xxx is float
282+
if self.phi is not None:
283283
x1, y2 = fea.principal_coordinate(
284284
phi=self.phi,
285285
x=nodes[0][0] - self.cx,

src/sectionproperties/pre/geometry.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,12 @@ def rotate_section(
750750

751751
new_ctrl_point = tuple(
752752
affinity.rotate(
753-
self.assigned_control_point, angle, rotate_point, use_radians
753+
self.assigned_control_point,
754+
angle,
755+
rotate_point, # type: ignore
756+
use_radians,
754757
).coords[0]
755-
) # type: ignore
758+
)
756759

757760
return Geometry(
758761
geom=affinity.rotate(self.geom, angle, rot_point, use_radians), # type: ignore
@@ -806,8 +809,12 @@ def mirror_section(
806809
y_mirror = -y_mirror
807810

808811
mirrored_geom = affinity.scale(
809-
self.geom, xfact=y_mirror, yfact=x_mirror, zfact=1.0, origin=m_pt
810-
) # type: ignore
812+
self.geom,
813+
xfact=y_mirror,
814+
yfact=x_mirror,
815+
zfact=1.0,
816+
origin=m_pt, # type: ignore
817+
)
811818

812819
new_ctrl_point: tuple[float, float] | None = None
813820

0 commit comments

Comments
 (0)