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 1818 (?P<path>(\w[^:.]+))
1919"""
2020"""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 2323from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
2424
2525from .base import Rule , RuleMap , URLProtocol
26- from .constants import RE_SCP , RE_USER
26+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
2727
2828RE_PATH = r"""
2929 (?P<hostname>([^/:]+))
108108 )
109109"""
110110
111- RE_PIP_REV = r"""
112- (@(?P<rev>.*))
113- """
114-
115111PIP_DEFAULT_RULES : list [Rule ] = [
116112 Rule (
117113 label = "pip-url" ,
Original file line number Diff line number Diff line change 2222from typing import Optional
2323
2424from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
25- from libvcs .url .git import RE_PIP_REV , RE_SUFFIX
25+ from libvcs .url .git import RE_SUFFIX
2626
2727from .base import Rule , RuleMap , URLProtocol
28- from .constants import RE_SCP , RE_USER
28+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
2929
3030RE_PATH = r"""
3131 (?P<hostname>([^/:]+))
Original file line number Diff line number Diff line change 2323from typing import Optional
2424
2525from libvcs ._internal .dataclasses import SkipDefaultFieldsReprMixin
26- from libvcs .url .git import RE_PIP_REV
2726
2827from .base import Rule , RuleMap , URLProtocol
29- from .constants import RE_SCP , RE_USER
28+ from .constants import RE_PIP_REV , RE_SCP , RE_USER
3029
3130RE_PATH = r"""
3231 (?P<hostname>([^/:@]+))
You can’t perform that action at this time.
0 commit comments