1. Stefano Parmesan
  2. pypy


wlav  committed ba631eb

o) make pyflakes happy

  • Participants
  • Parent commits b637b18
  • Branches reflex-support

Comments (0)

Files changed (3)

File pypy/module/cppyy/converter.py

View file
 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
         return _converters[name](space, default)
-    except KeyError, k:
+    except KeyError:
     #   1a) const-removed match
         return _converters[helper.remove_const(name)](space, default)
-    except KeyError, k:
+    except KeyError:
     #   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:
     #   3) accept const ref as by value

File pypy/module/cppyy/interp_cppyy.py

View file
-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
             CPPMethod.call(self, newthis, None, args_w)
-        except Exception, e:
+        except Exception:
             capi.c_deallocate(self.cpptype.handle, newthis)
         return new_instance(self.space, w_type, self.cpptype, newthis, True)

File pypy/module/cppyy/pythonify.py

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