![](/style/images/good.png)
![](/style/images/bad.png)
Allow requirement markers to be parsed by tetsuo-cpp · Pull Request #99 · di/pip...
source link: https://github.com/di/pip-api/pull/99
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
@@ -187,16 +187,21 @@ def parse_requirements(
req: Optional[Union[requirements.Requirement, UnparsedRequirement]] = None
known, _ = parser.parse_known_args(line.strip().split())
if known.req:
# We want to stop combining strings before an @ sign with space on either side
I realise this block of code is weird.
The tests in test_parse_requirements.py
are very specific about how package@url
should be treated vs package @ url
so that's why I've written it like this instead of just doing a str().join(known.req)
.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK