@@ -32,7 +32,7 @@ class Rule(SkipDefaultFieldsReprMixin):
3232 """Human readable description"""
3333 pattern : Pattern [str ]
3434 """Regex pattern"""
35- pattern_defaults : dict [str , str ] = dataclasses .field (default_factory = dict )
35+ defaults : dict [str , str ] = dataclasses .field (default_factory = dict )
3636 """Is the match unambiguous with other VCS systems? e.g. git+ prefix"""
3737 is_explicit : bool = False
3838
@@ -88,7 +88,7 @@ def register(self, cls: Rule) -> None:
8888 ... label = 'gh-prefix'
8989 ... description ='Matches prefixes like github:org/repo'
9090 ... pattern = r'^github:(?P<path>.*)$'
91- ... pattern_defaults = {
91+ ... defaults = {
9292 ... 'hostname': 'github.com',
9393 ... 'scheme': 'https'
9494 ... }
@@ -107,7 +107,7 @@ def register(self, cls: Rule) -> None:
107107 >>> GitHubURL.is_valid(url='github:vcs-python/libvcs', is_explicit=True)
108108 True
109109
110- Notice how ``pattern_defaults `` neatly fills the values for us.
110+ Notice how ``defaults `` neatly fills the values for us.
111111
112112 >>> GitHubURL(url='github:vcs-python/libvcs')
113113 GitHubURL(url=github:vcs-python/libvcs,
@@ -137,7 +137,7 @@ def register(self, cls: Rule) -> None:
137137 ... label = 'gl-prefix'
138138 ... description ='Matches prefixes like gitlab:org/repo'
139139 ... pattern = r'^gitlab:(?P<path>)'
140- ... pattern_defaults = {
140+ ... defaults = {
141141 ... 'hostname': 'gitlab.com',
142142 ... 'scheme': 'https',
143143 ... 'suffix': '.git'
0 commit comments