Skip to content

Commit 192edc0

Browse files
committed
fix requirement version parsing
1 parent 9ca2cf8 commit 192edc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pypiup/requirement.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def setUp(self, requirement):
2727
regex = re.split("==", requirement)
2828
try:
2929
self.name = regex[0]
30-
self.current_version = regex[1]
30+
# Ignore inline comments if any
31+
self.current_version = regex[1].split("#")[0].rstrip()
3132
self.get_package_info()
3233
self.compare()
3334
except IndexError:

0 commit comments

Comments
 (0)