@@ -307,9 +307,9 @@ def to_url(self) -> str:
307307 Examples
308308 --------
309309
310- >>> git_location = GitURL(url='git@github.com:vcs-python/libvcs.git')
310+ >>> git_url = GitURL(url='git@github.com:vcs-python/libvcs.git')
311311
312- >>> git_location
312+ >>> git_url
313313 GitURL(url=git@github.com:vcs-python/libvcs.git,
314314 user=git,
315315 hostname=github.com,
@@ -319,16 +319,16 @@ def to_url(self) -> str:
319319
320320 Switch repo libvcs -> vcspull:
321321
322- >>> git_location .path = 'vcs-python/vcspull'
322+ >>> git_url .path = 'vcs-python/vcspull'
323323
324- >>> git_location .to_url()
324+ >>> git_url .to_url()
325325 'git@github.com:vcs-python/vcspull.git'
326326
327327 Switch them to gitlab:
328328
329- >>> git_location .hostname = 'gitlab.com'
329+ >>> git_url .hostname = 'gitlab.com'
330330
331- >>> git_location .to_url()
331+ >>> git_url .to_url()
332332 'git@gitlab.com:vcs-python/vcspull.git'
333333
334334 todo
@@ -365,11 +365,11 @@ def to_url(self) -> str:
365365 Examples
366366 --------
367367
368- >>> git_location = GitPipURL(
368+ >>> git_url = GitPipURL(
369369 ... url='git+ssh://git@bitbucket.example.com:7999/PROJ/repo.git'
370370 ... )
371371
372- >>> git_location
372+ >>> git_url
373373 GitPipURL(url=git+ssh://git@bitbucket.example.com:7999/PROJ/repo.git,
374374 scheme=git+ssh,
375375 user=git,
@@ -379,18 +379,18 @@ def to_url(self) -> str:
379379 suffix=.git,
380380 matcher=pip-url)
381381
382- >>> git_location .path = 'libvcs/vcspull'
382+ >>> git_url .path = 'libvcs/vcspull'
383383
384- >>> git_location .to_url()
384+ >>> git_url .to_url()
385385 'git+ssh://bitbucket.example.com/libvcs/vcspull.git'
386386
387387 It also accepts revisions, e.g. branch, tag, ref:
388388
389- >>> git_location = GitPipURL(
389+ >>> git_url = GitPipURL(
390390 ... url='git+https://github.com/vcs-python/libvcs.git@v0.10.0'
391391 ... )
392392
393- >>> git_location
393+ >>> git_url
394394 GitPipURL(url=git+https://github.com/vcs-python/libvcs.git@v0.10.0,
395395 scheme=git+https,
396396 hostname=github.com,
@@ -399,9 +399,9 @@ def to_url(self) -> str:
399399 matcher=pip-url,
400400 rev=v0.10.0)
401401
402- >>> git_location .path = 'libvcs/vcspull'
402+ >>> git_url .path = 'libvcs/vcspull'
403403
404- >>> git_location .to_url()
404+ >>> git_url .to_url()
405405 'git+https://github.com/libvcs/vcspull.git@v0.10.0'
406406 """
407407 url = super ().to_url ()
@@ -438,36 +438,36 @@ def to_url(self) -> str:
438438 --------
439439
440440 SSH style URL:
441- >>> git_location = GitURL(url='git@github.com:vcs-python/libvcs.git')
441+ >>> git_url = GitURL(url='git@github.com:vcs-python/libvcs.git')
442442
443- >>> git_location .path = 'vcs-python/vcspull'
443+ >>> git_url .path = 'vcs-python/vcspull'
444444
445- >>> git_location .to_url()
445+ >>> git_url .to_url()
446446 'git@github.com:vcs-python/vcspull.git'
447447
448448 HTTPs URL:
449449
450- >>> git_location = GitURL(url='https://github.com/vcs-python/libvcs.git')
450+ >>> git_url = GitURL(url='https://github.com/vcs-python/libvcs.git')
451451
452- >>> git_location .path = 'vcs-python/vcspull'
452+ >>> git_url .path = 'vcs-python/vcspull'
453453
454- >>> git_location .to_url()
454+ >>> git_url .to_url()
455455 'https://github.com/vcs-python/vcspull.git'
456456
457457 Switch them to gitlab:
458458
459- >>> git_location .hostname = 'gitlab.com'
459+ >>> git_url .hostname = 'gitlab.com'
460460
461- >>> git_location .to_url()
461+ >>> git_url .to_url()
462462 'https://gitlab.com/vcs-python/vcspull.git'
463463
464464 Pip style URL, thanks to this class implementing :class:`GitPipURL`:
465465
466- >>> git_location = GitURL(url='git+ssh://git@github.com/vcs-python/libvcs')
466+ >>> git_url = GitURL(url='git+ssh://git@github.com/vcs-python/libvcs')
467467
468- >>> git_location .hostname = 'gitlab.com'
468+ >>> git_url .hostname = 'gitlab.com'
469469
470- >>> git_location .to_url()
470+ >>> git_url .to_url()
471471 'git+ssh://gitlab.com/vcs-python/libvcs'
472472
473473 See also
0 commit comments