Skip to content

Commit 2e75607

Browse files
committed
Update pre-commit dependencies and improve formatting in various files
1 parent 20a6e6c commit 2e75607

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
repos:
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.8.4
20+
rev: v0.9.4
2121
hooks:
2222
# Run the linter.
2323
- id: ruff
@@ -26,7 +26,7 @@ repos:
2626
- id: ruff-format
2727

2828
- repo: https://github.com/pre-commit/mirrors-mypy
29-
rev: v1.14.0
29+
rev: v1.14.1
3030
hooks:
3131
- id: mypy
3232
language_version: python3.12

blueprints/checks/nominal_concrete_cover/nominal_concrete_cover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def latex(self) -> str:
169169
r"Nominal concrete cover according to art. 4.4.1 (c_{nom})",
170170
"Minimum cover with regard to casting surface according to art. 4.4.1.3 (4)",
171171
),
172-
f"= {latex_max_curly_brackets(self.c_nom().latex().result,self.minimum_cover_with_regard_to_casting_surface(),)} = {self.value()} mm",
172+
f"= {latex_max_curly_brackets(self.c_nom().latex().result, self.minimum_cover_with_regard_to_casting_surface())} = {self.value()} mm",
173173
"",
174174
"Where:",
175175
f"{self.c_nom().latex().return_symbol} = {self.c_nom().latex().equation.replace('min', 'min,total')}"

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_5_structural_analysis/formula_5_18.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def latex(self) -> LatexFormula:
8585
equation=r"F_{V,Ed} \leq \frac{n_s}{n_s + 1.6} \cdot \frac{\sum E_{cd} \cdot I_c}{L^2}",
8686
numeric_equation=(
8787
rf"{self.left_hand_side:.3f}"
88-
rf"\leq \frac{{{self.n_s}}}{{{self.n_s + 1.6}}} \cdot \frac{{\sum {self.e_cd} \cdot {self.i_c}}}{{{self.length ** 2}}}"
88+
rf"\leq \frac{{{self.n_s}}}{{{self.n_s + 1.6}}} \cdot \frac{{\sum {self.e_cd} \cdot {self.i_c}}}{{{self.length**2}}}"
8989
),
9090
comparison_operator_label=r"\rightarrow",
9191
)

blueprints/codes/eurocode/nen_en_1992_1_1_c2_2011/chapter_8_detailing_of_reinforcement_and_prestressing_tendons/formula_8_10.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def latex(self) -> LatexFormula:
174174
return LatexFormula(
175175
return_symbol=r"\alpha_6",
176176
result=f"{self:.2f}",
177-
equation=f'{latex_max_curly_brackets(latex_min_curly_brackets(argument_1_formula, "1.5"), "1")}',
178-
numeric_equation=f'{latex_max_curly_brackets(latex_min_curly_brackets(numerical_argument_1, "1.5"), "1")}',
177+
equation=f"{latex_max_curly_brackets(latex_min_curly_brackets(argument_1_formula, '1.5'), '1')}",
178+
numeric_equation=f"{latex_max_curly_brackets(latex_min_curly_brackets(numerical_argument_1, '1.5'), '1')}",
179179
comparison_operator_label="=",
180180
)

blueprints/codes/eurocode/nen_en_1993_1_1_c2_a1_2016/chapter_2_basic_of_design/formula_2_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ def latex(self) -> LatexFormula:
4141
return_symbol=r"R_{k}",
4242
result=f"{self:.2f}",
4343
equation=r"R_d \cdot \gamma_{Mi}",
44-
numeric_equation=rf"{self.r_d :.2f} \cdot {self.gamma_mi :.2f}",
44+
numeric_equation=rf"{self.r_d:.2f} \cdot {self.gamma_mi:.2f}",
4545
comparison_operator_label="=",
4646
)

blueprints/structural_sections/concrete/reinforced_concrete_sections/plotters/rectangular.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,7 @@ def _add_stirrups_to_legend(self) -> str:
346346
if self.cross_section.stirrups:
347347
stirrups_text += f"\nStirrups ({sum(stirrup.as_w for stirrup in self.cross_section.stirrups):.0f} mm²/m):"
348348
for stirrup in self.cross_section.stirrups:
349-
stirrups_text += (
350-
f"\n{stirrup.diameter}-{stirrup.distance} mm (b:{stirrup.ctc_distance_legs:.0f} mm) ({stirrup.as_w:.0f} " f"mm²/m)"
351-
)
349+
stirrups_text += f"\n{stirrup.diameter}-{stirrup.distance} mm (b:{stirrup.ctc_distance_legs:.0f} mm) ({stirrup.as_w:.0f} mm²/m)"
352350
return stirrups_text
353351

354352
def _add_longitudinal_rebars_to_legend(self) -> str:

blueprints/utils/abc_enum_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ def __new__(cls, *args, **kwarg) -> type:
2525
missing = ", ".join(f"{method!r}" for method in abstract_methods)
2626
plural = "s" if len(abstract_methods) > 1 else ""
2727
raise TypeError(
28-
f"Can't instantiate abstract class {abstract_enum_cls.__name__!r}" f" without an implementation for abstract method{plural} {missing}"
28+
f"Can't instantiate abstract class {abstract_enum_cls.__name__!r} without an implementation for abstract method{plural} {missing}"
2929
)
3030
return abstract_enum_cls

0 commit comments

Comments
 (0)