Skip to content

Commit

Permalink
[skip ci] flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Apr 21, 2022
1 parent 096fce8 commit 1d944f2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion paramak/parametric_components/constant_thickness_dome.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ def find_points(self):
# far side

if self.chord_height * 2 >= self.chord_width:
msg = "ConstantThicknessDome requires that the self.chord_width is at least 2 times as large as the chord height"
msg = (
"ConstantThicknessDome requires that the self.chord_width "
"is at least 2 times as large as the chord height"
)
raise ValueError(msg)

radius_of_sphere = ((math.pow(self.chord_width, 2)) + (4.0 * math.pow(self.chord_height, 2))) / (
Expand Down
1 change: 0 additions & 1 deletion paramak/reactor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from collections.abc import Iterable
from logging import warning
from pathlib import Path
from typing import List, Optional, Tuple, Union

Expand Down
6 changes: 5 additions & 1 deletion paramak/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ def rotation_axis(self, value):
raise ValueError(msg)
for val in point:
if not isinstance(val, (int, float)):
msg = f"Shape.rotation_axis should be an iterable of iterables where the nested iterables are numerical, not {type(val)}"
msg = (
"Shape.rotation_axis should be an iterable of "
"iterables where the nested iterables are "
f"numerical, not {type(val)}"
)
raise ValueError(msg)

if value[0] == value[1]:
Expand Down
3 changes: 2 additions & 1 deletion tests/test_parametric_shapes/test_extrude_mixed_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def test_convert_all_circle_points_change_to_splines(self):
assert self.test_shape_2.processed_points[-4] == (150, 100, "straight")
assert self.test_shape_2.processed_points[-5] == (200, 100, "straight")

for point in self.test_shape_2.processed_points[1 : len(self.test_shape_2.points) - 5]:
spline_points = len(self.test_shape_2.points) - 5
for point in self.test_shape_2.processed_points[1:spline_points]:
assert point[2] == "spline"

def test_convert_circles_to_splines_volume(self):
Expand Down

0 comments on commit 1d944f2

Please sign in to comment.