Commits

wlav committed ba631eb

o) make pyflakes happy

Comments (0)

Files changed (3)

pypy/module/cppyy/converter.py

 import sys
 
 from pypy.interpreter.error import OperationError
-from pypy.interpreter.buffer import Buffer
 from pypy.rpython.lltypesystem import rffi, lltype
 from pypy.rlib.rarithmetic import r_singlefloat
 from pypy.rlib import jit, libffi, clibffi
 _converters = {}         # builtin and custom types
 _a_converters = {}       # array and ptr versions of above
 def get_converter(space, name, default):
-    from pypy.module.cppyy import interp_cppyy
     # The matching of the name to a converter should follow:
     #   1) full, exact match
     #       1a) const-removed match
     #   1) full, exact match
     try:
         return _converters[name](space, default)
-    except KeyError, k:
+    except KeyError:
         pass
 
     #   1a) const-removed match
     try:
         return _converters[helper.remove_const(name)](space, default)
-    except KeyError, k:
+    except KeyError:
         pass
 
     #   2) match of decorated, unqualified type
         # array_index may be negative to indicate no size or no size found
         array_size = helper.array_size(name)
         return _a_converters[clean_name+compound](space, array_size)
-    except KeyError, k:
+    except KeyError:
         pass
 
     #   3) accept const ref as by value

pypy/module/cppyy/interp_cppyy.py

-import pypy.module.cppyy.capi as capi
-
 from pypy.interpreter.error import OperationError
-from pypy.interpreter.gateway import ObjSpace, interp2app, unwrap_spec
+from pypy.interpreter.gateway import interp2app, unwrap_spec
 from pypy.interpreter.typedef import TypeDef, interp_attrproperty
 from pypy.interpreter.baseobjspace import Wrappable, W_Root
 
         assert lltype.typeOf(newthis) == capi.C_OBJECT
         try:
             CPPMethod.call(self, newthis, None, args_w)
-        except Exception, e:
+        except Exception:
             capi.c_deallocate(self.cpptype.handle, newthis)
             raise
         return new_instance(self.space, w_type, self.cpptype, newthis, True)

pypy/module/cppyy/pythonify.py

     else:                                        # return instance
         try:
             cppclass = get_cppclass(rettype)
-        except AttributeError, e:
+        except AttributeError:
             import warnings
             warnings.warn("class %s unknown: no data member access" % rettype,
                           RuntimeWarning)