Simplify some unneeded lambdas.

This commit is contained in:
Florian Bruhin 2015-03-23 07:04:50 +01:00
parent 8811947f50
commit 21d2bb2291
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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