Skip to content

Commit 37584e2

Browse files
committed
feat(parse,git,pip): Rename regexes
1 parent 3af1236 commit 37584e2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

libvcs/parse/git.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,23 @@
101101
)
102102
"""
103103

104-
RE_PIP_SCHEME_WITH_HTTP = r"""
104+
RE_PIP_SCP_SCHEME = r"""
105105
(?P<scheme>
106106
(
107107
git\+ssh|
108-
git\+https|
109-
git\+http|
110108
git\+file
111109
)
112110
)
113111
"""
114112

113+
115114
PIP_DEFAULT_MATCHERS: list[Matcher] = [
116115
Matcher(
117116
label="pip-url",
118117
description="pip-style git URL",
119118
pattern=re.compile(
120119
rf"""
121-
{RE_PIP_SCHEME_WITH_HTTP}
120+
{RE_PIP_SCHEME}
122121
://
123122
{RE_PATH}
124123
{RE_SUFFIX}?
@@ -131,7 +130,7 @@
131130
description="pip-style git ssh/scp URL",
132131
pattern=re.compile(
133132
rf"""
134-
{RE_PIP_SCHEME}
133+
{RE_PIP_SCP_SCHEME}
135134
{SCP_REGEX}?
136135
{RE_SUFFIX}
137136
""",

0 commit comments

Comments
 (0)