Skip to content

Commit f0c62f6

Browse files
committed
fix pre-commit
1 parent 06346ae commit f0c62f6

28 files changed

+60
-142
lines changed

CITATION.cff

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ keywords:
1919
- black-box optimization
2020
version: "0.5.1"
2121
date-released: "2024-05-01"
22-

docs/_generators/convert_mermaid_to_svg.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ def extract_mermaid_from_rst(content: str) -> str | None:
1616
if match:
1717
# Remove the 4-space indentation
1818
lines = match.group(1).split("\n")
19-
dedented = "\n".join(
20-
line[4:] if line.startswith(" ") else line for line in lines
21-
)
19+
dedented = "\n".join(line[4:] if line.startswith(" ") else line for line in lines)
2220
return dedented.strip()
2321
return None
2422

@@ -134,9 +132,9 @@ def main():
134132

135133
file_path.write_text(new_content)
136134
converted += 1
137-
print(f" Done")
135+
print(" Done")
138136
else:
139-
print(f" Failed to generate SVG")
137+
print(" Failed to generate SVG")
140138

141139
print(f"\nConverted {converted} diagrams")
142140

src/surfaces/test_functions/algebraic/test_functions_2d/easom_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# License: MIT License
44

5-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any, Dict
66

77
import numpy as np
88

99
from .._base_algebraic_function import AlgebraicFunction
1010

1111
if TYPE_CHECKING:
12-
from surfaces.noise import BaseNoise
12+
pass
1313

1414

1515
class EasomFunction(AlgebraicFunction):

src/surfaces/test_functions/algebraic/test_functions_2d/himmelblaus_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# License: MIT License
44

5-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any, Dict
66

77
import numpy as np
88

99
from .._base_algebraic_function import AlgebraicFunction
1010

1111
if TYPE_CHECKING:
12-
from surfaces.noise import BaseNoise
12+
pass
1313

1414

1515
class HimmelblausFunction(AlgebraicFunction):

src/surfaces/test_functions/algebraic/test_functions_2d/hoelder_table_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# License: MIT License
44

5-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any, Dict
66

77
import numpy as np
88

99
from .._base_algebraic_function import AlgebraicFunction
1010

1111
if TYPE_CHECKING:
12-
from surfaces.noise import BaseNoise
12+
pass
1313

1414

1515
class HölderTableFunction(AlgebraicFunction):

src/surfaces/test_functions/algebraic/test_functions_2d/simionescu_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
33
# License: MIT License
44

5-
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
5+
from typing import TYPE_CHECKING, Any, Dict
66

77
import numpy as np
88

99
from .._base_algebraic_function import AlgebraicFunction
1010

1111
if TYPE_CHECKING:
12-
from surfaces.noise import BaseNoise
12+
pass
1313

1414

1515
class SimionescuFunction(AlgebraicFunction):

src/surfaces/test_functions/engineering/pressure_vessel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ class PressureVesselFunction(EngineeringFunction):
138138
variable_bounds = [(0.0625, 6.1875), (0.0625, 6.1875), (10.0, 200.0), (10.0, 200.0)]
139139

140140
# Function sheet attributes
141-
latex_formula = r"f(T_s, T_h, R, L) = 0.6224 T_s R L + 1.7781 T_h R^2 + 3.1661 T_s^2 L + 19.84 T_s^2 R"
141+
latex_formula = (
142+
r"f(T_s, T_h, R, L) = 0.6224 T_s R L + 1.7781 T_h R^2 + 3.1661 T_s^2 L + 19.84 T_s^2 R"
143+
)
142144
tagline = (
143145
"A cylindrical tank design problem minimizing manufacturing cost. "
144146
"Shell/head thickness and vessel dimensions must satisfy stress and volume constraints."

src/surfaces/test_functions/machine_learning/image/classification/test_functions/deep_cnn_classifier.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
from typing import Any, Dict
2-
3-
# Author: Simon Blanke
4-
5-
# License: MIT License
6-
71
"""Deep CNN Image Classifier test function."""
82

3+
from typing import Any, Dict
4+
95
import numpy as np
106

117
from .._base_image_classification import BaseImageClassification

src/surfaces/test_functions/machine_learning/image/classification/test_functions/random_forest_image_classifier.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
from typing import Any, Dict
2-
3-
# Author: Simon Blanke
4-
5-
# License: MIT License
6-
71
"""Random Forest Image Classifier test function."""
82

3+
from typing import Any, Dict
4+
95
import numpy as np
106
from sklearn.decomposition import PCA
117
from sklearn.ensemble import RandomForestClassifier

src/surfaces/test_functions/machine_learning/image/classification/test_functions/simple_cnn_classifier.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
from typing import Any, Dict
2-
3-
# Author: Simon Blanke
4-
5-
# License: MIT License
6-
71
"""Simple CNN Image Classifier test function."""
82

3+
from typing import Any, Dict
4+
95
import numpy as np
106

117
from .._base_image_classification import BaseImageClassification

0 commit comments

Comments
 (0)