|
60 | 60 | # Some https repos have .git at the end, e.g. https://github.com/org/repo.git |
61 | 61 |
|
62 | 62 |
|
63 | | -DEFAULT_MATCHERS: list[Rule] = [ |
| 63 | +DEFAULT_RULES: list[Rule] = [ |
64 | 64 | Rule( |
65 | 65 | label="core-git-https", |
66 | 66 | description="Vanilla git pattern, URL ending with optional .git suffix", |
|
125 | 125 | """ |
126 | 126 |
|
127 | 127 |
|
128 | | -PIP_DEFAULT_MATCHERS: list[Rule] = [ |
| 128 | +PIP_DEFAULT_RULES: list[Rule] = [ |
129 | 129 | Rule( |
130 | 130 | label="pip-url", |
131 | 131 | description="pip-style git URL", |
|
191 | 191 | - https://pip.pypa.io/en/stable/topics/vcs-support/ |
192 | 192 | """ # NOQA: E501 |
193 | 193 |
|
194 | | -NPM_DEFAULT_MATCHERS: list[Rule] = [] |
| 194 | +NPM_DEFAULT_RULES: list[Rule] = [] |
195 | 195 | """NPM-style git URLs. |
196 | 196 |
|
197 | 197 | Git URL pattern (from docs.npmjs.com):: |
@@ -262,7 +262,7 @@ class GitBaseURL(URLProtocol, SkipDefaultFieldsReprMixin): |
262 | 262 | suffix: Optional[str] = None |
263 | 263 |
|
264 | 264 | rule: Optional[str] = None |
265 | | - rule_map: RuleMap = RuleMap(_rule_map={m.label: m for m in DEFAULT_MATCHERS}) |
| 265 | + rule_map: RuleMap = RuleMap(_rule_map={m.label: m for m in DEFAULT_RULES}) |
266 | 266 |
|
267 | 267 | def __post_init__(self) -> None: |
268 | 268 | url = self.url |
@@ -370,7 +370,7 @@ class GitPipURL(GitBaseURL, URLProtocol, SkipDefaultFieldsReprMixin): |
370 | 370 | # commit-ish (rev): tag, branch, ref |
371 | 371 | rev: Optional[str] = None |
372 | 372 |
|
373 | | - rule_map: RuleMap = RuleMap(_rule_map={m.label: m for m in PIP_DEFAULT_MATCHERS}) |
| 373 | + rule_map: RuleMap = RuleMap(_rule_map={m.label: m for m in PIP_DEFAULT_RULES}) |
374 | 374 |
|
375 | 375 | def to_url(self) -> str: |
376 | 376 | """Exports a pip-compliant URL. |
@@ -479,7 +479,7 @@ class GitURL(GitPipURL, GitBaseURL, URLProtocol, SkipDefaultFieldsReprMixin): |
479 | 479 | """ |
480 | 480 |
|
481 | 481 | rule_map: RuleMap = RuleMap( |
482 | | - _rule_map={m.label: m for m in [*DEFAULT_MATCHERS, *PIP_DEFAULT_MATCHERS]} |
| 482 | + _rule_map={m.label: m for m in [*DEFAULT_RULES, *PIP_DEFAULT_RULES]} |
483 | 483 | ) |
484 | 484 |
|
485 | 485 | @classmethod |
|
0 commit comments