Skip to content

Commit

Permalink
canonicalize package name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby authored and abn committed May 10, 2022
1 parent 08ba451 commit 259bbbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/poetry/core/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from poetry.core.version.pep440 import PEP440Version


_canonicalize_regex = re.compile(r"[-_]+")
_canonicalize_regex = re.compile(r"[-_.]+")


def combine_unicode(string: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_parse_requires() -> None:
assert result == expected


@pytest.mark.parametrize("raw", ["a-b-c", "a_b-c", "a_b_c", "a-b_c"])
@pytest.mark.parametrize("raw", ["a-b-c", "a_b-c", "a_b_c", "a-b_c", "a.b-c"])
def test_utils_helpers_canonical_names(raw: str) -> None:
assert canonicalize_name(raw) == "a-b-c"

Expand Down

0 comments on commit 259bbbe

Please sign in to comment.