@@ -215,32 +215,32 @@ class GitBaseURL(URLProtocol, SkipDefaultFieldsReprMixin):
215
215
216
216
Examples
217
217
--------
218
- >>> GitURL (url='https://github.com/vcs-python/libvcs.git')
219
- GitURL (url=https://github.com/vcs-python/libvcs.git,
218
+ >>> GitBaseURL (url='https://github.com/vcs-python/libvcs.git')
219
+ GitBaseURL (url=https://github.com/vcs-python/libvcs.git,
220
220
scheme=https,
221
221
hostname=github.com,
222
222
path=vcs-python/libvcs,
223
223
suffix=.git,
224
224
matcher=core-git-https)
225
225
226
- >>> myrepo = GitURL (url='https://github.com/myproject/myrepo.git')
226
+ >>> myrepo = GitBaseURL (url='https://github.com/myproject/myrepo.git')
227
227
228
228
>>> myrepo.hostname
229
229
'github.com'
230
230
231
231
>>> myrepo.path
232
232
'myproject/myrepo'
233
233
234
- >>> GitURL (url='git@github.com:vcs-python/libvcs.git')
235
- GitURL (url=git@github.com:vcs-python/libvcs.git,
234
+ >>> GitBaseURL (url='git@github.com:vcs-python/libvcs.git')
235
+ GitBaseURL (url=git@github.com:vcs-python/libvcs.git,
236
236
user=git,
237
237
hostname=github.com,
238
238
path=vcs-python/libvcs,
239
239
suffix=.git,
240
240
matcher=core-git-scp)
241
241
242
- - Compatibility checking: :meth:`GitURL .is_valid()`
243
- - URLs compatible with ``git(1)``: :meth:`GitURL .to_url()`
242
+ - Compatibility checking: :meth:`GitBaseURL .is_valid()`
243
+ - URLs compatible with ``git(1)``: :meth:`GitBaseURL .to_url()`
244
244
245
245
Attributes
246
246
----------
@@ -284,26 +284,26 @@ def is_valid(cls, url: str, is_explicit: Optional[bool] = None) -> bool:
284
284
Examples
285
285
--------
286
286
287
- >>> GitURL .is_valid(url='https://github.com/vcs-python/libvcs.git')
287
+ >>> GitBaseURL .is_valid(url='https://github.com/vcs-python/libvcs.git')
288
288
True
289
289
290
- >>> GitURL .is_valid(url='git@github.com:vcs-python/libvcs.git')
290
+ >>> GitBaseURL .is_valid(url='git@github.com:vcs-python/libvcs.git')
291
291
True
292
292
293
- >>> GitURL .is_valid(url='notaurl')
293
+ >>> GitBaseURL .is_valid(url='notaurl')
294
294
False
295
295
296
296
**Unambiguous VCS detection**
297
297
298
298
Sometimes you may want to match a VCS exclusively, without any change for, e.g.
299
299
in order to outright detect the VCS system being used.
300
300
301
- >>> GitURL .is_valid(
301
+ >>> GitBaseURL .is_valid(
302
302
... url='git@github.com:vcs-python/libvcs.git', is_explicit=True
303
303
... )
304
304
False
305
305
306
- In this case, check :meth:`GitPipURL.is_valid` or :meth:`GitURL .is_valid`'s
306
+ In this case, check :meth:`GitPipURL.is_valid` or :meth:`GitBaseURL .is_valid`'s
307
307
examples.
308
308
"""
309
309
if is_explicit is not None :
@@ -320,10 +320,10 @@ def to_url(self) -> str:
320
320
Examples
321
321
--------
322
322
323
- >>> git_url = GitURL (url='git@github.com:vcs-python/libvcs.git')
323
+ >>> git_url = GitBaseURL (url='git@github.com:vcs-python/libvcs.git')
324
324
325
325
>>> git_url
326
- GitURL (url=git@github.com:vcs-python/libvcs.git,
326
+ GitBaseURL (url=git@github.com:vcs-python/libvcs.git,
327
327
user=git,
328
328
hostname=github.com,
329
329
path=vcs-python/libvcs,
0 commit comments