Skip to content

Commit a615a7d

Browse files
Fix typing in concrete_sections.py
1 parent 8459928 commit a615a7d

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

sectionproperties/pre/library/concrete_sections.py

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import Union, Optional
22
import numpy as np
3-
from shapely.geometry import Polygon
43
import sectionproperties.pre.pre as pre
54
import sectionproperties.pre.geometry as geometry
65
import sectionproperties.pre.library.primitive_sections as primitive_sections
@@ -15,11 +14,11 @@ def concrete_rectangular_section(
1514
n_bot: int,
1615
n_circle: int,
1716
cover: float,
18-
dia_side: float = None,
17+
dia_side: Optional[float] = None,
1918
n_side: int = 0,
20-
area_top: float = None,
21-
area_bot: float = None,
22-
area_side: float = None,
19+
area_top: Optional[float] = None,
20+
area_bot: Optional[float] = None,
21+
area_side: Optional[float] = None,
2322
conc_mat: pre.Material = pre.DEFAULT_MATERIAL,
2423
steel_mat: pre.Material = pre.DEFAULT_MATERIAL,
2524
) -> geometry.CompoundGeometry:
@@ -47,10 +46,8 @@ def concrete_rectangular_section(
4746
:param float area_side: If provided, constructs side reinforcing bars based on
4847
their area rather than diameter (prevents the underestimation of steel area due
4948
to circle discretisation)
50-
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to
51-
associate with the concrete
52-
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
53-
associate with the steel
49+
:param conc_mat: Material to associate with the concrete
50+
:param steel_mat: Material to associate with the steel
5451
5552
:raises ValueError: If the number of bars is not greater than or equal to 2 in an
5653
active layer
@@ -181,11 +178,11 @@ def concrete_column_section(
181178
:param int n_bars_d: Number of bars placed across the depth of the section, minimum 2.
182179
:param float dia_bar: Diameter of reinforcing bars. Used for calculating bar placement and,
183180
optionally, for calculating the bar area for section capacity calculations.
184-
:param Optional[float] bar_area: Area of reinforcing bars. Used for section capacity calculations.
181+
:param float bar_area: Area of reinforcing bars. Used for section capacity calculations.
185182
If not provided, then dia_bar will be used to calculate the bar area.
186-
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to
183+
:param sectionproperties.pre.pre.Material conc_mat: Material to
187184
associate with the concrete
188-
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
185+
:param sectionproperties.pre.pre.Material steel_mat: Material to
189186
associate with the reinforcing steel
190187
:param bool filled: When True, will populate the concrete section with an equally
191188
spaced 2D array of reinforcing bars numbering 'n_bars_b' by 'n_bars_d'.
@@ -290,8 +287,8 @@ def concrete_tee_section(
290287
n_bot: int,
291288
n_circle: int,
292289
cover: float,
293-
area_top: float = None,
294-
area_bot: float = None,
290+
area_top: Optional[float] = None,
291+
area_bot: Optional[float] = None,
295292
conc_mat: pre.Material = pre.DEFAULT_MATERIAL,
296293
steel_mat: pre.Material = pre.DEFAULT_MATERIAL,
297294
) -> geometry.CompoundGeometry:
@@ -316,10 +313,8 @@ def concrete_tee_section(
316313
:param float area_bot: If provided, constructs bottom reinforcing bars based on
317314
their area rather than diameter (prevents the underestimation of steel area due
318315
to circle discretisation)
319-
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate
320-
with the concrete
321-
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
322-
associate with the steel
316+
:param conc_mat: Material to associatewith the concrete
317+
:param steel_mat: Material toassociate with the steel
323318
324319
:raises ValueErorr: If the number of bars is not greater than or equal to 2 in an
325320
active layer
@@ -407,8 +402,8 @@ def concrete_circular_section(
407402
n_bar: int,
408403
n_circle: int,
409404
cover: float,
410-
area_conc: float = None,
411-
area_bar: float = None,
405+
area_conc: Optional[float] = None,
406+
area_bar: Optional[float] = None,
412407
conc_mat: pre.Material = pre.DEFAULT_MATERIAL,
413408
steel_mat: pre.Material = pre.DEFAULT_MATERIAL,
414409
) -> geometry.CompoundGeometry:
@@ -427,10 +422,8 @@ def concrete_circular_section(
427422
circle discretisation)
428423
:param float area_bar: If provided, constructs reinforcing bars based on their area
429424
rather than diameter (prevents the underestimation of steel area due to
430-
:param Optional[sectionproperties.pre.pre.Material] conc_mat: Material to associate
431-
with the concrete
432-
:param Optional[sectionproperties.pre.pre.Material] steel_mat: Material to
433-
associate with the steel
425+
:param conc_mat: Material to associate with the concrete
426+
:param steel_mat: Material to associate with the steel
434427
435428
:raises ValueErorr: If the number of bars is not greater than or equal to 2
436429

0 commit comments

Comments
 (0)