From 6bc2e5870513332b2caf89b66ca46c2b4915f955 Mon Sep 17 00:00:00 2001 From: Danilo Guanabara Date: Mon, 16 Oct 2023 16:34:14 -0300 Subject: [PATCH] Python symbols parsing is now skipping private modules --- ecosystem/python/parser/src/symbols/module.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ecosystem/python/parser/src/symbols/module.rs b/ecosystem/python/parser/src/symbols/module.rs index 7280a2dd..f5f88811 100644 --- a/ecosystem/python/parser/src/symbols/module.rs +++ b/ecosystem/python/parser/src/symbols/module.rs @@ -68,14 +68,15 @@ impl Parser> for ModuleParser { .map(String::from) .unwrap_or_default(); if extension == "py" || path.is_dir() { - let module = self.parse(path.as_path())?; - if let Some(existing) = modules - .iter_mut() - .find(|existing| existing.identifier == module.identifier) - { - existing.join(module) - } else { - modules.push(module); + if let Ok(module) = self.parse(path.as_path()) { + if let Some(existing) = modules + .iter_mut() + .find(|existing| existing.identifier == module.identifier) + { + existing.join(module) + } else { + modules.push(module); + } } } }