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

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

オープン
#24 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。