@@ -32,7 +32,7 @@ class Rule(SkipDefaultFieldsReprMixin):
32
32
"""Human readable description"""
33
33
pattern : Pattern [str ]
34
34
"""Regex pattern"""
35
- pattern_defaults : dict [str , str ] = dataclasses .field (default_factory = dict )
35
+ defaults : dict [str , str ] = dataclasses .field (default_factory = dict )
36
36
"""Is the match unambiguous with other VCS systems? e.g. git+ prefix"""
37
37
is_explicit : bool = False
38
38
@@ -88,7 +88,7 @@ def register(self, cls: Rule) -> None:
88
88
... label = 'gh-prefix'
89
89
... description ='Matches prefixes like github:org/repo'
90
90
... pattern = r'^github:(?P<path>.*)$'
91
- ... pattern_defaults = {
91
+ ... defaults = {
92
92
... 'hostname': 'github.com',
93
93
... 'scheme': 'https'
94
94
... }
@@ -107,7 +107,7 @@ def register(self, cls: Rule) -> None:
107
107
>>> GitHubURL.is_valid(url='github:vcs-python/libvcs', is_explicit=True)
108
108
True
109
109
110
- Notice how ``pattern_defaults `` neatly fills the values for us.
110
+ Notice how ``defaults `` neatly fills the values for us.
111
111
112
112
>>> GitHubURL(url='github:vcs-python/libvcs')
113
113
GitHubURL(url=github:vcs-python/libvcs,
@@ -137,7 +137,7 @@ def register(self, cls: Rule) -> None:
137
137
... label = 'gl-prefix'
138
138
... description ='Matches prefixes like gitlab:org/repo'
139
139
... pattern = r'^gitlab:(?P<path>)'
140
- ... pattern_defaults = {
140
+ ... defaults = {
141
141
... 'hostname': 'gitlab.com',
142
142
... 'scheme': 'https',
143
143
... 'suffix': '.git'
0 commit comments