Skip to content

Commit

Permalink
fixing mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Oct 2, 2023
1 parent 0bdd27a commit c47921e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyzx/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def spider(
set_z_box_label(g, v_in, phase)
v_out = v_in
else:
assert isinstance(phase, (int, Fraction))
v_in = g.add_vertex(typ, (inputs-1)/2, 1, phase)
v_out = v_in
inp = []
Expand Down
1 change: 1 addition & 0 deletions pyzx/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(self) -> None:
self.phase_master: Optional['simplify.Simplifier'] = None
self.phase_mult: Dict[int,Literal[1,-1]] = dict()
self.max_phase_index: int = -1
self._vdata: Dict[VT,Dict[str,Any]] = dict()

# merge_vdata(v0,v1) is an optional, custom function for merging
# vdata of v1 into v0 during spider fusion etc.
Expand Down
1 change: 1 addition & 0 deletions pyzx/graph/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class GraphDiff(Generic[VT, ET]):
changed_edge_types: Dict[ET, EdgeType.Type]
changed_phases: Dict[VT, FractionLike]
changed_pos: Dict[VT, Tuple[FloatInt,FloatInt]]
changed_vdata: Dict[VT, Any]

def __init__(self, g1: BaseGraph[VT,ET], g2: BaseGraph[VT,ET]) -> None:
self.calculate_diff(g1,g2)
Expand Down

0 comments on commit c47921e

Please sign in to comment.