Skip to content

Commit

Permalink
fixup typing in network_plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjgowers committed Oct 10, 2023
1 parent f136b92 commit a43daec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openfe/utils/network_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class EventHandler:
selected : Optional[Union[Node, Edge]]
Object selected by a mouse click (after mouse is up), or None if no
object has been selected in the graph.
click_location : tuple[Optional[float], Optional[float]]
click_location : Optional[tuple[Optional[float], Optional[float]]]
Cached location of the mousedown event, or None if mouse is up
connections : List[int]
list of IDs for connections to matplotlib canvas
Expand All @@ -247,7 +247,7 @@ def __init__(self, graph: GraphDrawing):
self.graph = graph
self.active: Optional[Union[Node, Edge]] = None
self.selected: Optional[Union[Node, Edge]] = None
self.click_location: tuple[Optional[float], Optional[float]] = None, None
self.click_location: Optional[tuple[Optional[float], Optional[float]]] = None
self.connections: list[int] = []

def connect(self, canvas: MPL_FigureCanvasBase):
Expand Down Expand Up @@ -319,7 +319,7 @@ def on_mouseup(self, event: MPL_MouseEvent):
self.active.on_mouseup(event, self.graph)

self.active = None
self.click_location = None, None
self.click_location = None
self.graph.draw()


Expand Down

0 comments on commit a43daec

Please sign in to comment.