Skip to content

Commit d621379

Browse files
committed
Clarify function to extract data from wheel name
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 5c7208a commit d621379

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

etc/release/utils_thirdparty.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ class Sdist(Distribution):
975975
@classmethod
976976
def from_filename(cls, filename):
977977
"""
978-
Return a sdist object built from a filename.
978+
Return a Sdist object built from a filename.
979979
Raise an exception if this is not a valid sdist filename
980980
"""
981981
name_ver = None
@@ -1048,12 +1048,12 @@ class Wheel(Distribution):
10481048
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10491049
"""
10501050

1051-
wheel_file_re = re.compile(
1051+
get_wheel_from_filename = re.compile(
10521052
r"""^(?P<namever>(?P<name>.+?)-(?P<ver>.*?))
10531053
((-(?P<build>\d[^-]*?))?-(?P<pyvers>.+?)-(?P<abis>.+?)-(?P<plats>.+?)
10541054
\.whl)$""",
10551055
re.VERBOSE
1056-
)
1056+
).match
10571057

10581058
build = attr.ib(
10591059
type=str,
@@ -1092,7 +1092,7 @@ def from_filename(cls, filename):
10921092
Return a wheel object built from a filename.
10931093
Raise an exception if this is not a valid wheel filename
10941094
"""
1095-
wheel_info = cls.wheel_file_re.match(filename)
1095+
wheel_info = cls.get_wheel_from_filename(filename)
10961096
if not wheel_info:
10971097
raise InvalidDistributionFilename(filename)
10981098

0 commit comments

Comments
 (0)