File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 18
18
(?P<path>(\w[^:.]+))
19
19
"""
20
20
"""Regular expression for scp-style of git URLs."""
21
+
22
+ #
23
+ # Third-party URLs, e.g. npm, pip, etc.
24
+ #
25
+ RE_PIP_REV = r"""
26
+ (@(?P<rev>.*))
27
+ """
28
+ """Pip-style revision for branch or revision."""
Original file line number Diff line number Diff line change 23
23
from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
24
24
25
25
from .base import Rule , RuleMap , URLProtocol
26
- from .constants import RE_SCP , RE_USER
26
+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
27
27
28
28
RE_PATH = r"""
29
29
(?P<hostname>([^/:]+))
108
108
)
109
109
"""
110
110
111
- RE_PIP_REV = r"""
112
- (@(?P<rev>.*))
113
- """
114
-
115
111
PIP_DEFAULT_RULES : list [Rule ] = [
116
112
Rule (
117
113
label = "pip-url" ,
Original file line number Diff line number Diff line change 22
22
from typing import Optional
23
23
24
24
from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
25
- from libvcs .url .git import RE_PIP_REV , RE_SUFFIX
25
+ from libvcs .url .git import RE_SUFFIX
26
26
27
27
from .base import Rule , RuleMap , URLProtocol
28
- from .constants import RE_SCP , RE_USER
28
+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
29
29
30
30
RE_PATH = r"""
31
31
(?P<hostname>([^/:]+))
Original file line number Diff line number Diff line change 23
23
from typing import Optional
24
24
25
25
from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
26
- from libvcs .url .git import RE_PIP_REV
27
26
28
27
from .base import Rule , RuleMap , URLProtocol
29
- from .constants import RE_SCP , RE_USER
28
+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
30
29
31
30
RE_PATH = r"""
32
31
(?P<hostname>([^/:@]+))
You can’t perform that action at this time.
0 commit comments