From d79a35241822e0b49115cd616656ba52a6935f61 Mon Sep 17 00:00:00 2001 From: iseki Date: Fri, 10 Jun 2022 15:22:27 +0800 Subject: [PATCH] fix: python requirements parse pattern --- module/python/python.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/python/python.go b/module/python/python.go index ef27b5a4..001896ec 100644 --- a/module/python/python.go +++ b/module/python/python.go @@ -14,7 +14,7 @@ import ( "strings" ) -var pyRequirementsPattern = regexp.MustCompile("^([A-Za-z0-9_-]+) *== *([^= \\n\\r]+)$") +var pyRequirementsPattern = regexp.MustCompile("^([A-Za-z0-9_-]+) *.?= *([^= \\n\\r]+)$") var pyImportPattern1 = regexp.MustCompile("import\\s+(?:[A-Za-z_-][A-Za-z_0-9.-]*)(?:\\s*,\\s*(?:[A-Za-z_-][A-Za-z_0-9.-]*))") var pyImportPattern2 = regexp.MustCompile("from\\s+([A-Za-z_-][A-Za-z_0-9-]*)")