From 21d2bb2291381bf7b1927d4d75f88c3897786382 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 23 Mar 2015 07:04:50 +0100 Subject: [PATCH] Simplify some unneeded lambdas. --- qutebrowser/app.py | 2 +- qutebrowser/browser/network/networkmanager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 02320493a..3e133eecb 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -472,7 +472,7 @@ class Application(QApplication): def _get_widgets(self): """Get a string list of all widgets.""" widgets = self.allWidgets() - widgets.sort(key=lambda e: repr(e)) + widgets.sort(key=repr) return [repr(w) for w in widgets] def _get_pyqt_objects(self, lines, obj, depth=0): diff --git a/qutebrowser/browser/network/networkmanager.py b/qutebrowser/browser/network/networkmanager.py index cb8e0572f..40ace13db 100644 --- a/qutebrowser/browser/network/networkmanager.py +++ b/qutebrowser/browser/network/networkmanager.py @@ -356,5 +356,5 @@ class NetworkManager(QNetworkAccessManager): else: reply = super().createRequest(op, req, outgoing_data) self._requests.append(reply) - reply.destroyed.connect(lambda obj: self._requests.remove(obj)) + reply.destroyed.connect(self._requests.remove) return reply