Correct normalize_package_name (#115750)

This commit is contained in:
Erik Montnemery 2024-04-17 12:03:06 +02:00 committed by GitHub
parent ba4731ecb4
commit a3c767da2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -261,8 +261,8 @@ def normalize_package_name(requirement: str) -> str:
if not match:
return ""
# pipdeptree needs lowercase and dash instead of underscore as separator
return match.group(1).lower().replace("_", "-")
# pipdeptree needs lowercase and dash instead of underscore or period as separator
return match.group(1).lower().replace("_", "-").replace(".", "-")
def comment_requirement(req: str) -> bool: