File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 55import dataclasses
66import enum
77import math
8+ import string
89from dataclasses import MISSING
910from enum import Enum
1011from fractions import Fraction
@@ -91,8 +92,8 @@ def domain_to_str(domain: set[Node]) -> str:
9192 return f"{{{ ',' .join (str (node ) for node in domain )} }}"
9293
9394
94- SUBSCRIPTS = str .maketrans ("0123456789" , "₀₁₂₃₄₅₆₇₈₉" )
95- SUPERSCRIPTS = str .maketrans ("0123456789" , "⁰¹²³⁴⁵⁶⁷⁸⁹" )
95+ SUBSCRIPTS = str .maketrans (string . digits , "₀₁₂₃₄₅₆₇₈₉" )
96+ SUPERSCRIPTS = str .maketrans (string . digits , "⁰¹²³⁴⁵⁶⁷⁸⁹" )
9697
9798
9899def command_to_str (cmd : command .Command , output : OutputFormat ) -> str :
Original file line number Diff line number Diff line change @@ -84,7 +84,4 @@ def test_pattern_pretty_print_example() -> None:
8484def test_pattern_pretty_print_random (fx_bg : PCG64 , jumps : int , output : OutputFormat ) -> None :
8585 rng = Generator (fx_bg .jumped (jumps ))
8686 rand_pat = rand_circuit (5 , 5 , rng = rng ).transpile ().pattern
87- try :
88- pattern_to_str (rand_pat , output )
89- except Exception as e :
90- pytest .fail (str (e ))
87+ pattern_to_str (rand_pat , output )
You can’t perform that action at this time.
0 commit comments