From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C370113838B for ; Fri, 19 Sep 2014 08:52:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9D090E084A; Fri, 19 Sep 2014 08:52:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 525F8E084A for ; Fri, 19 Sep 2014 08:52:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 539E533FCF3 for ; Fri, 19 Sep 2014 08:52:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E85D9E7D for ; Fri, 19 Sep 2014 08:52:45 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1411116479.52970a73754160a203e34684e7000ba6f8a47667.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/resolver/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/tests/resolver/ResolverPlayground.py X-VCS-Directories: pym/portage/tests/resolver/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 52970a73754160a203e34684e7000ba6f8a47667 X-VCS-Branch: master Date: Fri, 19 Sep 2014 08:52:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9cbc24e3-db5f-4748-b93d-5ed69895aed7 X-Archives-Hash: 7a748cbe48f1e90a3ecc8e619544eb7e commit: 52970a73754160a203e34684e7000ba6f8a47667 Author: Zac Medico gentoo org> AuthorDate: Fri Sep 19 08:47:59 2014 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Sep 19 08:47:59 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=52970a73 ResolverPlayground: inline _iter_forced_rebuilds Use an inline generator expression rather than a function, since the function was only used once. --- pym/portage/tests/resolver/ResolverPlayground.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index 646987d..d74a410 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -778,12 +778,10 @@ class ResolverPlaygroundResult(object): for dep_info in self.depgraph._dynamic_config._unsatisfied_deps_for_display) if self.depgraph._forced_rebuilds: - self.forced_rebuilds = dict(self._iter_forced_rebuilds()) - - def _iter_forced_rebuilds(self): - for child_dict in self.depgraph._forced_rebuilds.values(): - for child, parents in child_dict.items(): - yield child.cpv, set(parent.cpv for parent in parents) + self.forced_rebuilds = dict( + (child.cpv, set(parent.cpv for parent in parents)) + for child_dict in self.depgraph._forced_rebuilds.values() + for child, parents in child_dict.items()) class ResolverPlaygroundDepcleanResult(object):