From 6b55d5a5969abf4bbc0b51a6be0a1c6ad5e169df Mon Sep 17 00:00:00 2001 From: lixu Date: Fri, 1 Nov 2024 17:22:55 +0800 Subject: [PATCH] Remove unused variable 'hint_resolutions' - Removed the unused variable `hint_resolutions` from the `resolve` function. - Directly used the dictionary comprehension to populate `hint_references` from `hint.get_resolutions()`. - Simplified the logic by eliminating an unnecessary intermediate variable. Signed-off-by: lixu --- avocado/core/resolver.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/avocado/core/resolver.py b/avocado/core/resolver.py index 0accae1218..6f55a383d4 100644 --- a/avocado/core/resolver.py +++ b/avocado/core/resolver.py @@ -261,12 +261,10 @@ def _extend_directory(path): def resolve(references, hint=None, ignore_missing=True, config=None): resolutions = [] - hint_resolutions = [] hint_references = {} if hint: - hint_resolutions = hint.get_resolutions() - hint_references = {r.reference: r for r in hint_resolutions} + hint_references = {r.reference: r for r in hint.get_resolutions()} if not references and hint_references: references = list(hint_references.keys())