From da5b18a418233e289229d3d124f6352e531c9ffb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 17 Jan 2024 04:49:32 -0800 Subject: [PATCH] depgraph: Fix SyntaxWarning: 'str' object is not callable Fixes: a5078e577493 ("emerge: backtrack consistently regardless of --fetchonly") Signed-off-by: Zac Medico --- lib/_emerge/depgraph.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py index 7491d970c3..1cbbbaf815 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py @@ -3794,7 +3794,8 @@ def _eliminate_rebuilds(self): except KeyError: optional_msg = " ({} previously removed from graph)" warnings.warn( - f"_eliminate_rebuilds inconsistency: parent priorities missing for {parent} -> {pkg} edge"( + f"_eliminate_rebuilds inconsistency: parent priorities missing for {parent} -> {pkg} edge" + + ( optional_msg.format("parent and child") if parent in removed and pkg in removed else optional_msg.format("parent") @@ -3815,7 +3816,8 @@ def _eliminate_rebuilds(self): except KeyError: optional_msg = " ({} previously removed from graph)" warnings.warn( - f"_eliminate_rebuilds inconsistency: parent priorities missing for {pkg} -> {child} edge"( + f"_eliminate_rebuilds inconsistency: parent priorities missing for {pkg} -> {child} edge" + + ( optional_msg.format("parent and child") if pkg in removed and child in removed else optional_msg.format("parent")