@@ -62,11 +62,11 @@ def add_flex_arithmetic_methods(cls):
6262 flex_arith_method , flex_comp_method = _get_method_wrappers (cls )
6363 new_methods = _create_methods (cls , flex_arith_method , flex_comp_method )
6464 new_methods .update (
65- dict (
66- multiply = new_methods ["mul" ],
67- subtract = new_methods ["sub" ],
68- divide = new_methods ["div" ],
69- )
65+ {
66+ " multiply" : new_methods ["mul" ],
67+ " subtract" : new_methods ["sub" ],
68+ " divide" : new_methods ["div" ],
69+ }
7070 )
7171 # opt out of bool flex methods for now
7272 assert not any (kname in new_methods for kname in ("ror_" , "rxor" , "rand_" ))
@@ -84,22 +84,22 @@ def _create_methods(cls, arith_method, comp_method):
8484 new_methods = {}
8585
8686 new_methods .update (
87- dict (
88- add = arith_method (operator .add ),
89- radd = arith_method (radd ),
90- sub = arith_method (operator .sub ),
91- mul = arith_method (operator .mul ),
92- truediv = arith_method (operator .truediv ),
93- floordiv = arith_method (operator .floordiv ),
94- mod = arith_method (operator .mod ),
95- pow = arith_method (operator .pow ),
96- rmul = arith_method (rmul ),
97- rsub = arith_method (rsub ),
98- rtruediv = arith_method (rtruediv ),
99- rfloordiv = arith_method (rfloordiv ),
100- rpow = arith_method (rpow ),
101- rmod = arith_method (rmod ),
102- )
87+ {
88+ " add" : arith_method (operator .add ),
89+ " radd" : arith_method (radd ),
90+ " sub" : arith_method (operator .sub ),
91+ " mul" : arith_method (operator .mul ),
92+ " truediv" : arith_method (operator .truediv ),
93+ " floordiv" : arith_method (operator .floordiv ),
94+ " mod" : arith_method (operator .mod ),
95+ " pow" : arith_method (operator .pow ),
96+ " rmul" : arith_method (rmul ),
97+ " rsub" : arith_method (rsub ),
98+ " rtruediv" : arith_method (rtruediv ),
99+ " rfloordiv" : arith_method (rfloordiv ),
100+ " rpow" : arith_method (rpow ),
101+ " rmod" : arith_method (rmod ),
102+ }
103103 )
104104 new_methods ["div" ] = new_methods ["truediv" ]
105105 new_methods ["rdiv" ] = new_methods ["rtruediv" ]
@@ -109,14 +109,14 @@ def _create_methods(cls, arith_method, comp_method):
109109 new_methods ["rdivmod" ] = arith_method (rdivmod )
110110
111111 new_methods .update (
112- dict (
113- eq = comp_method (operator .eq ),
114- ne = comp_method (operator .ne ),
115- lt = comp_method (operator .lt ),
116- gt = comp_method (operator .gt ),
117- le = comp_method (operator .le ),
118- ge = comp_method (operator .ge ),
119- )
112+ {
113+ "eq" : comp_method (operator .eq ),
114+ "ne" : comp_method (operator .ne ),
115+ "lt" : comp_method (operator .lt ),
116+ "gt" : comp_method (operator .gt ),
117+ "le" : comp_method (operator .le ),
118+ "ge" : comp_method (operator .ge ),
119+ }
120120 )
121121
122122 new_methods = {k .strip ("_" ): v for k , v in new_methods .items ()}
0 commit comments