8000 docs(url): doctest fixes · vcs-python/libvcs@fb4c054 · GitHub
[go: up one dir, main page]

Skip to content

Commit fb4c054

Browse files
committed
docs(url): doctest fixes
1 parent 7cb649f commit fb4c054

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/url/index.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ satisfy the niche.
2121
{meth}`libvcs.url.git.GitURL.is_valid()`
2222
2323
```python
24-
from libvcs.url.git import GitURL
24+
>>> from libvcs.url.git import GitURL
2525
2626
>>> GitURL.is_valid(url='https://github.com/vcs-python/libvcs.git')
2727
True
2828
```
2929
3030
```python
31-
from libvcs.url.git import GitURL
31+
>>> from libvcs.url.git import GitURL
3232
3333
>>> GitURL.is_valid(url='git@github.com:vcs-python/libvcs.git')
3434
True
@@ -40,11 +40,15 @@ True
4040
{meth}`libvcs.url.hg.HgURL.is_valid()`
4141
4242
```python
43+
>>> from libvcs.url.hg import HgURL
44+
4345
>>> HgURL.is_valid(url='https://hg.mozilla.org/mozilla-central/mozilla-central')
4446
True
4547
```
4648
4749
```python
50+
>>> from libvcs.url.hg import HgURL
51+
4852
>>> HgURL.is_valid(url='hg@hg.mozilla.org:MyProject/project')
4953
True
5054
```
@@ -57,12 +61,16 @@ True
5761
5862
5963
```python
64+
>>> from libvcs.url.svn import SvnURL
65+
6066
>>> SvnURL.is_valid(
6167
... url='https://svn.project.org/project-central/project-central')
6268
True
6369
```
6470
6571
```python
72+
>>> from libvcs.url.svn import SvnURL
73+
6674
>>> SvnURL.is_valid(url='svn@svn.project.org:MyProject/project')
6775
True
6876
```
@@ -78,8 +86,10 @@ _Compare to {class}`urllib.parse.ParseResult`_
7886
{class}`libvcs.url.git.GitURL`
7987
8088
```python
81-
>>> GitBaseURL(url='git@github.com:vcs-python/libvcs.git')
82-
GitBaseURL(url=git@github.com:vcs-python/libvcs.git,
89+
>>> from libvcs.url.git import GitURL
90+
91+
>>> GitURL(url='git@github.com:vcs-python/libvcs.git')
92+
GitURL(url=git@github.com:vcs-python/libvcs.git,
8393
user=git,
8494
hostname=github.com,
8595
path=vcs-python/libvcs,
@@ -94,9 +104,11 @@ GitBaseURL(url=git@github.com:vcs-python/libvcs.git,
94104
{class}`libvcs.url.hg.HgURL`
95105
96106
```python
97-
>>> HgBaseURL(
107+
>>> from libvcs.url.hg import HgURL
108+
109+
>>> HgURL(
98110
... url="http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin")
99-
HgBaseURL(url=http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin,
111+
HgURL(url=http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin,
100112
scheme=http,
101113
hostname=hugin.hg.sourceforge.net,
102114
port=8000,
@@ -111,13 +123,15 @@ HgBaseURL(url=http://hugin.hg.sourceforge.net:8000/hgroot/hugin/hugin,
111123
{class}`libvcs.url.svn.SvnURL`
112124
113125
```python
126+
>>> from libvcs.url.svn import SvnURL
127+
114128
>>> SvnURL(
115129
... url='svn+ssh://svn.debian.org/svn/aliothproj/path/in/project/repository')
116130
SvnURL(url=svn+ssh://svn.debian.org/svn/aliothproj/path/in/project/repository,
117131
scheme=svn+ssh,
118132
hostname=svn.debian.org,
119133
path=svn/aliothproj/path/in/project/repository,
120-
rule=core-svn)
134+
rule=pip-url)
121135
```
122136
123137
````

0 commit comments

Comments
 (0)
0