aboutcode-org / aboutcode-org/pip-requirements-parser

[BUG] VCS URLs are detected as path on linux systems

未关闭
#24 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
20
派生
13
PR 合并指标
30 天内没有已合并 PR

描述

# issue
`'git+https://github.com/path/to/package-one@41b95ec#egg=package-one'`
is detected as a path, but actually it is just a VCS url

# expected:

`'git+https://github.com/path/to/package-one@41b95ec#egg=package-one'`
is NOT detected as a path

# reason:
```py
def _looks_like_path(name: str) -> bool:
"""Checks whether the string ``name`` "looks like" a path on the filesystem.

This does not check whether the target actually exists, only judge from the
appearance.

Returns true if any of the following conditions is true:
* a path separator is found (either os.path.sep or os.path.altsep);
* a dot is found (which represents the current directory).
"""
if not name:
return False
if os.path.sep in name:
return True
# exists here, on linux/unix, as there is a '/' in the name
# ...
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。