Skip to content

Commit a9e48ac

Browse files
committed
fix ruff errors
1 parent 0fc69f9 commit a9e48ac

File tree

2 files changed

+5
-3
lines changed
  • blueprints/codes/eurocode

2 files changed

+5
-3
lines changed

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_9_detailling_and_specific_rules/formula_9_1n.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@ def _evaluate(
6060

6161
def latex(self) -> LatexFormula:
6262
"""Returns LatexFormula object for formula 9.1N."""
63+
fraction = latex_fraction(numerator=f"{self.f_ctm:.2f}", denominator=f"{self.f_yk:.2f}")
6364
return LatexFormula(
6465
return_symbol=r"A_{s,min}",
6566
result=f"{self:.2f}",
6667
equation=latex_max_curly_brackets(
67-
rf"0.26 \cdot {latex_fraction(r'f_{ctm}', r'f_{yk}')} \cdot b_t \cdot d",
68+
rf"0.26 \cdot {latex_fraction(numerator=r'f_{ctm}', denominator=r'f_{yk}')} \cdot b_t \cdot d",
6869
r"0.0013 \cdot b_t \cdot d",
6970
),
7071
numeric_equation=latex_max_curly_brackets(
71-
rf"0.26 \cdot {latex_fraction(f'{self.f_ctm:.2f}', f'{self.f_yk:.2f}')} \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
72+
rf"0.26 \cdot {fraction} \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
7273
rf"0.0013 \cdot {self.b_t:.2f} \cdot {self.d:.2f}",
7374
),
7475
comparison_operator_label="=",

blueprints/codes/eurocode/nen_en_1993_5_2008/chapter_5_ultimate_limit_states/formula_5_9.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def latex(self) -> LatexFormula:
9797
latex_equation = latex_min_curly_brackets(
9898
r"\left(\beta_b \cdot W_{pl} - \frac{\rho \cdot A_v^2}{4 \cdot t_w \cdot \sin(\alpha)}\right) \cdot \frac{f_y}{\gamma_{M0}}, M_{c,Rd}"
9999
)
100+
fraction = latex_fraction(numerator=f"{self.f_y:.2f}", denominator=f"{self.gamma_m_0:.2f}")
100101
return LatexFormula(
101102
return_symbol=r"M_{V,Rd}",
102103
result=f"{self:.3f}",
@@ -105,7 +106,7 @@ def latex(self) -> LatexFormula:
105106
latex_min_curly_brackets(
106107
rf"\left({self.beta_b:.2f} \cdot {self.w_pl:.2f} - \frac{{{self.rho:.2f} \cdot {self.a_v:.2f}^2}}{{4 \cdot {self.t_w:.2f} \cdot "
107108
rf"\sin({self.alpha:.2f})}}\right) \cdot "
108-
rf"{latex_fraction(f'{self.f_y:.2f}', f'{self.gamma_m_0:.2f}')} \cdot 10^{{-6}}, {self.mc_rd:.2f}"
109+
rf"{fraction} \cdot 10^{{-6}}, {self.mc_rd:.2f}"
109110
)
110111
),
111112
comparison_operator_label="=",

0 commit comments

Comments
 (0)