Skip to content

Commit

Permalink
Merge branch 'main' into feat-truststore
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret authored Oct 17, 2024
2 parents dfac553 + 80d09c0 commit ec50805
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/poetry/utils/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@


wheel_file_re = re.compile(
r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))"
r"(-(?P<build>\d.*?))?"
r"-(?P<pyver>.+?)"
r"-(?P<abi>.+?)"
r"-(?P<plat>.+?)"
r"\.whl|\.dist-info$",
r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d[^-]*))"
r"(-(?P<build>\d[^-]*))?"
r"-(?P<pyver>[^-]+)"
r"-(?P<abi>[^-]+)"
r"-(?P<plat>[^-]+)"
r"\.whl$",
re.VERBOSE,
)

Expand Down
12 changes: 12 additions & 0 deletions tests/utils/test_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@
"plat": "manylinux2010_x86_64",
},
),
(
"isort-metadata-4.3.4-py2-none-any.whl",
{
"namever": "isort-metadata-4.3.4",
"name": "isort-metadata",
"ver": "4.3.4",
"build": None,
"pyver": "py2",
"abi": "none",
"plat": "any",
},
),
],
)
def test_wheel_file_re(filename: str, expected: dict[str, str | None]) -> None:
Expand Down

0 comments on commit ec50805

Please sign in to comment.