Merge pull request #991 from jschueller/patch-1

[Python] Fix E731: do not assign a lambda expression
This commit is contained in:
William S Fulton 2017-05-20 12:59:02 +01:00 committed by GitHub
commit 18d7e0462e

View file

@ -5033,7 +5033,7 @@ public:
Printv(f_shadow, tab4, "__swig_destroy__ = ", module, ".", Swig_name_destroy(NSPACE_TODO, symname), "\n", NIL);
if (!have_pythonprepend(n) && !have_pythonappend(n)) {
if (proxydel) {
Printv(f_shadow, tab4, "__del__ = lambda self: None\n", NIL);
Printv(f_shadow, tab4, "def __del__(self):\n", tab8, "return None\n", NIL);
}
return SWIG_OK;
}