Skip to content

Commit

Permalink
Added comment needed for zxcalc#234
Browse files Browse the repository at this point in the history
  • Loading branch information
jvdwetering committed Jul 16, 2024
1 parent d861a13 commit d81356b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyzx/graph/jsonparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def string_to_phase(string: str, g: Union[BaseGraph,'GraphDiff']) -> Union[Fract
elif '/' in s:
a, b = s.split("/", 2)
if not a:
return Fraction(int(1), int(b))
return Fraction(int(1), int(b)) # For some weird reason this int(1) is needed. See PR #234.
if a == '-':
a = '-1'
return Fraction(int(a), int(b))
Expand Down

0 comments on commit d81356b

Please sign in to comment.