Skip to content

Commit

Permalink
minor changes to the pr
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jan 25, 2024
1 parent 3a15b6e commit c044566
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zxlive/proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Rewrite(NamedTuple):

display_name: str # Name of proof displayed to user
rule: str # Name of the rule that was applied to get to this step
graph: GraphT # Diff from the last step to this step
graph: GraphT # New graph after applying the rewrite

def to_json(self) -> str:
"""Serializes the rewrite to JSON."""
Expand Down Expand Up @@ -58,7 +58,7 @@ def set_graph(self, index: int, graph: GraphT):
new_step = Rewrite(old_step.display_name, old_step.rule, graph)
self.steps[index-1] = new_step

def graphs(self) -> [GraphT]:
def graphs(self) -> list[GraphT]:
return [self.initial_graph] + [step.graph for step in self.steps]

def data(self, index: Union[QModelIndex, QPersistentModelIndex], role: int=Qt.ItemDataRole.DisplayRole) -> Any:
Expand Down Expand Up @@ -114,7 +114,7 @@ def pop_rewrite(self) -> tuple[Rewrite, GraphT]:
return rewrite, rewrite.graph

def get_graph(self, index: int) -> GraphT:
"""Returns the grap at a given position in the proof."""
"""Returns the graph at a given position in the proof."""
if index == 0:
return self.initial_graph.copy()
else:
Expand Down

0 comments on commit c044566

Please sign in to comment.