From a45fc4d0b88337984c3b8e3562ce5901cee835c1 Mon Sep 17 00:00:00 2001 From: nikpivkin Date: Thu, 19 Dec 2024 14:17:48 +0600 Subject: [PATCH] refactor: remove unnecessary package checking Signed-off-by: nikpivkin --- pkg/fanal/analyzer/language/python/poetry/poetry.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/fanal/analyzer/language/python/poetry/poetry.go b/pkg/fanal/analyzer/language/python/poetry/poetry.go index 01f521e6d812..84073459ea0b 100644 --- a/pkg/fanal/analyzer/language/python/poetry/poetry.go +++ b/pkg/fanal/analyzer/language/python/poetry/poetry.go @@ -150,12 +150,7 @@ func walkPackageDeps(pkgID string, packages map[string]types.Package, visited ma return } visited[pkgID] = struct{}{} - pkg, exists := packages[pkgID] - if !exists { - return - } - - for _, dep := range pkg.DependsOn { + for _, dep := range packages[pkgID].DependsOn { walkPackageDeps(dep, packages, visited) } }