Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packvers/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ZeroOrMore,
originalTextFor,
stringEnd,
stringStart,
stringStart, pythonStyleComment,
)

from .markers import MARKER_EXPR, Marker
Expand Down Expand Up @@ -78,7 +78,8 @@ class InvalidRequirement(ValueError):

NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
REQUIREMENT = stringEnd | (stringStart + NAMED_REQUIREMENT + stringEnd)
REQUIREMENT.ignore(pythonStyleComment)
# pyparsing isn't thread safe during initialization, so we do it eagerly, see
# issue #104
REQUIREMENT.parseString("x[]")
Expand Down