@@ -169,8 +169,12 @@ def __hash__(self):
169169 try :
170170 return hash (("CompiledCode" , ctypes .addressof (self .cfunc ))) # XXX hack
171171 except TypeError :
172- return hash (("CompiledCode" , self .cfunc ,)) # XXX hack
173-
172+ return hash (
173+ (
174+ "CompiledCode" ,
175+ self .cfunc ,
176+ )
177+ ) # XXX hack
174178
175179 def atom_to_boxes (self , f , evaluation : Evaluation ):
176180 return CompiledCodeBox (String (self .__str__ ()), evaluation = evaluation )
@@ -194,7 +198,9 @@ class CompiledFunction(Builtin):
194198
195199 """
196200
197- messages = {"argerr" : "Invalid argument `1` should be Integer, Real, Complex or boolean." }
201+ messages = {
202+ "argerr" : "Invalid argument `1` should be Integer, Real, Complex or boolean."
203+ }
198204 summary_text = "A CompiledFunction object."
199205
200206 def eval (self , argnames , expr , code , args , evaluation : Evaluation ):
@@ -206,8 +212,13 @@ def eval(self, argnames, expr, code, args, evaluation: Evaluation):
206212
207213 py_args = []
208214 args_spec = code .args or []
209- if len (args_spec )!= len (argseq ):
210- evaluation .mesage ("CompiledFunction" ,"cfct" , Integer (len (argseq )), Integer (len (args_spec )))
215+ if len (args_spec ) != len (argseq ):
216+ evaluation .mesage (
217+ "CompiledFunction" ,
218+ "cfct" ,
219+ Integer (len (argseq )),
220+ Integer (len (args_spec )),
221+ )
211222 return
212223 for arg , spec in zip (argseq , args_spec ):
213224 # TODO: check if the types are consistent.
@@ -225,7 +236,7 @@ def eval(self, argnames, expr, code, args, evaluation: Evaluation):
225236 except TypeError :
226237 # Fallback by replace values in expr?
227238 return
228- py_args .append (val )
239+ py_args .append (val )
229240 try :
230241 result = code .cfunc (* py_args )
231242 except (TypeError , ctypes .ArgumentError ):
0 commit comments