Skip to content

Commit

Permalink
Fix NameError: name 'ScheduleLineElement' is not defined error in Arg…
Browse files Browse the repository at this point in the history
…os (#500)

* Fix NameError: name 'ScheduleLineElement' is not defined error in Argos

* Remove unused import to fix Python linter errors
  • Loading branch information
bdutro authored May 3, 2024
1 parent 2f3dc4c commit 3092846
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions helios/pipeViewer/pipe_view/model/element_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
# [Element, val].
from __future__ import annotations
from bisect import bisect, bisect_left
from typing import Any, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
from typing import Any, Dict, List, Optional, Tuple, Union
from . import content_options as content
from . import highlighting_utils
from .element import Element, FakeElement, PropertyValue

if TYPE_CHECKING:
from .schedule_element import ScheduleLineElement
from .schedule_element import ScheduleLineElement


TimedVal = Tuple[Optional[Union[int, str]], Tuple[int, int]]
Expand Down
6 changes: 5 additions & 1 deletion helios/pipeViewer/pipe_view/model/schedule_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
PropertyValue,
ValidatedPropertyDict)
from . import element_propsvalid as valid
from .element_value import Element_Value, FakeElementValue

if TYPE_CHECKING:
from .element_value import Element_Value, FakeElementValue

if TYPE_CHECKING:
from .clock_manager import ClockManager
Expand Down Expand Up @@ -387,6 +389,8 @@ def GetQueryFrame(self, period: int) -> Tuple[int, int]:
def DetectCollision(self,
pt: Union[Tuple[int, int], wx.Point],
pair: Element_Value) -> FakeElementValue:
from .element_value import FakeElementValue

mx, my = pt

period = pair.GetClockPeriod()
Expand Down

0 comments on commit 3092846

Please sign in to comment.