Skip to content

Commit d69cbd2

Browse files
committed
cleaning
1 parent b69e287 commit d69cbd2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

edg/core/Range.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ def intersects(self, other: 'Range') -> bool:
152152

153153
def intersect(self, other: 'Range') -> 'Range':
154154
# TODO make behavior more consistent w/ compiler and returning empty that props as a unit
155-
assert self.intersects(other), "Cannot intersect ranges that do not intersect"
155+
if not self.intersects(other):
156+
raise ValueError("cannot intersect ranges that do not intersect")
156157
return Range(max(self.lower, other.lower), min(self.upper, other.upper))
157158

158159
def __add__(self, other: Union['Range', float]) -> 'Range':

examples/test_fcml.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ def generate(self):
174174

175175
class FcmlPowerPath(InternalSubcircuit, GeneratorBlock):
176176
"""FCML power path that accounts for inductor scaling behavior
177-
TODO: this basically completely duplicates BuckConverterPowerPath, but adds a scaling factor that doesn't exist there
177+
TODO: Is there a way to unify this with BuckConverterPowerPath?
178+
This basically completely duplicates it, but adds a scaling factor that doesn't exist there
178179
"""
179180
@init_in_parent
180181
def __init__(self, input_voltage: RangeLike, output_voltage: RangeLike, frequency: RangeLike,

0 commit comments

Comments
 (0)