File tree Expand file tree Collapse file tree 1 file changed +14
-32
lines changed
Expand file tree Collapse file tree 1 file changed +14
-32
lines changed Original file line number Diff line number Diff line change 1818NAME = r"[%\w~.\-]+"
1919REV = r"[^@#]+?"
2020SUBDIR = r"[\w\-/\\]+"
21+ PATTERN_SUFFIX = (
22+ r"(?:"
23+ rf"#(?:egg=.+?&subdirectory=|subdirectory=)(?P<subdirectory>{ SUBDIR } )"
24+ r"|"
25+ r"#egg=?.+"
26+ r"|"
27+ rf"[@#](?P<rev>{ REV } )(?:[&#](?:(?:egg=.+?&subdirectory=|subdirectory=)(?P<rev_subdirectory>{ SUBDIR } )|egg=.+?))?"
28+ r")?"
29+ r"$"
30+ )
2131
2232PATTERNS = [
2333 re .compile (
2838 rf"(:(?P<port>{ PORT } ))?"
2939 rf"(?P<pathname>[:/\\]({ PATH } [/\\])?"
3040 rf"((?P<name>{ NAME } ?)(\.git|[/\\])?)?)"
31- r"(?:"
32- rf"#(?:egg=.+?&subdirectory=|subdirectory=)(?P<subdirectory>{ SUBDIR } )"
33- r"|"
34- r"#egg=?.+"
35- r"|"
36- rf"[@#](?P<rev>{ REV } )(?:[&#](?:(?:egg=.+?&subdirectory=|subdirectory=)(?P<rev_subdirectory>{ SUBDIR } )|egg=.+?))?"
37- r")?"
38- r"$"
41+ rf"{ PATTERN_SUFFIX } "
3942 ),
4043 re .compile (
4144 r"(git\+)?"
4548 rf"(:(?P<port>{ PORT } ))?"
4649 rf"(?P<pathname>({ PATH } )"
4750 rf"(?P<name>{ NAME } )(\.git|/)?)"
48- r"(?:"
49- rf"#(?:egg=.+?&subdirectory=|subdirectory=)(?P<subdirectory>{ SUBDIR } )"
50- r"|"
51- r"#egg=?.+"
52- r"|"
53- rf"[@#](?P<rev>{ REV } )(?:[&#](?:(?:egg=.+?&subdirectory=|subdirectory=)(?P<rev_subdirectory>{ SUBDIR } )|egg=.+?))?"
54- r")?"
55- r"$"
51+ rf"{ PATTERN_SUFFIX } "
5652 ),
5753 re .compile (
5854 rf"^(?:(?P<user>{ USER } )@)?"
5955 rf"(?P<resource>{ RESOURCE } )"
6056 rf"(:(?P<port>{ PORT } ))?"
6157 rf"(?P<pathname>([:/]{ PATH } /)"
6258 rf"(?P<name>{ NAME } )(\.git|/)?)"
63- r"(?:"
64- rf"#(?:egg=.+?&subdirectory=|subdirectory=)(?P<subdirectory>{ SUBDIR } )"
65- r"|"
66- r"#egg=?.+"
67- r"|"
68- rf"[@#](?P<rev>{ REV } )(?:[&#](?:(?:egg=.+?&subdirectory=|subdirectory=)(?P<rev_subdirectory>{ SUBDIR } )|egg=.+?))?"
69- r")?"
70- r"$"
59+ rf"{ PATTERN_SUFFIX } "
7160 ),
7261 re .compile (
7362 rf"((?P<user>{ USER } )@)?"
7463 rf"(?P<resource>{ RESOURCE } )"
7564 r"[:/]{{1,2}}"
7665 rf"(?P<pathname>({ PATH } )"
7766 rf"(?P<name>{ NAME } )(\.git|/)?)"
78- r"(?:"
79- rf"#(?:egg=.+?&subdirectory=|subdirectory=)(?P<subdirectory>{ SUBDIR } )"
80- r"|"
81- r"#egg=?.+"
82- r"|"
83- rf"[@#](?P<rev>{ REV } )(?:[&#](?:(?:egg=.+?&subdirectory=|subdirectory=)(?P<rev_subdirectory>{ SUBDIR } )|egg=.+?))?"
84- r")?"
85- r"$"
67+ rf"{ PATTERN_SUFFIX } "
8668 ),
8769]
8870
You can’t perform that action at this time.
0 commit comments