Skip to content

Commit

Permalink
Linting corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacmackin committed Sep 20, 2024
1 parent 5be90de commit eb006ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions neso_fame/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,9 @@ def _merge_prisms(p1: Prism, p2: Prism) -> Prism:
join_on = next(iter(common_face))
north, potential_east = (face for face in p1.sides if face != join_on)
north_points = FrozenCoordSet(north.shape([0.0, 1.0]).iter_points())
potential_east_points = FrozenCoordSet(potential_east.shape([0.0, 1.0]).iter_points())
potential_east_points = FrozenCoordSet(
potential_east.shape([0.0, 1.0]).iter_points()
)
q2_1, q2_2 = (face for face in p2.sides if face != join_on)
if len(FrozenCoordSet(q2_1.shape([0.0, 1.0]).iter_points()) & north_points) == 0:
south = q2_1
Expand All @@ -780,7 +782,10 @@ def _merge_prisms(p1: Prism, p2: Prism) -> Prism:
vertex0 = next(iter(north_points - potential_east_points))
vertex1 = next(iter(potential_east_points - north_points))
vertex3 = next(
iter(FrozenCoordSet(potential_west.shape([0.0, 1.0]).iter_points()) - north_points)
iter(
FrozenCoordSet(potential_west.shape([0.0, 1.0]).iter_points())
- north_points
)
)
jacobian = (vertex1.x2 - vertex0.x2) * (vertex3.x1 - vertex0.x1) - (
vertex1.x1 - vertex0.x1
Expand Down Expand Up @@ -1076,7 +1081,7 @@ def whole_line_in_tokamak(start: SliceCoord, wall: Sequence[WallSegment]) -> boo
else:
wall = eqdsk_wall
wall_points = [tuple(p) for p in wall]
# Should be fine to require exact equality when comparing wall coordinates,
# Should be fine to require exact equality when comparing wall coordinates
wall_coord_pairs = frozenset(
periodic_pairwise(SliceCoord(p[0], p[1], system) for p in wall_points)
)
Expand Down
2 changes: 1 addition & 1 deletion neso_fame/wall.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from scipy.interpolate import interp1d

from neso_fame.coordinates import (
CoordMap,
CoordinateSystem,
CoordMap,
FrozenCoordSet,
MutableCoordMap,
SliceCoord,
Expand Down

0 comments on commit eb006ad

Please sign in to comment.