Skip to content

Commit eabf5ed

Browse files
committed
docs: Fix autodoc linking
1 parent 1693384 commit eabf5ed

File tree

3 files changed

+23
-25
lines changed

3 files changed

+23
-25
lines changed

libvcs/git.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
# -*- coding: utf-8 -*-
22
"""Git Repo object for libvcs.
33
4-
From https://github.com/saltstack/salt (Apache License):
4+
.. todo::
55
6-
- [`GitRepo.remote`](libvcs.git.GitRepo.remote) (renamed to ``remote``)
7-
- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``)
6+
From https://github.com/saltstack/salt (Apache License):
87
9-
From pip (MIT Licnese):
8+
- [`GitRepo.remote`](libvcs.git.GitRepo.remote) (renamed to ``remote``)
9+
- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``)
1010
11-
- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``)
12-
- [`GitRepo.convert_pip_url`](libvcs.git.GitRepo.convert_pip_url`) (``get_url_rev``)
13-
- [`GitRepo.get_revision`](libvcs.git.GitRepo.get_revision)
14-
- [`GitRepo.get_git_version`](libvcs.git.GitRepo.get_git_version)
11+
From pip (MIT Licnese):
12+
13+
- [`GitRepo.remote`](libvcs.git.GitRepo.remote_set) (renamed to ``set_remote``)
14+
- [`GitRepo.convert_pip_url`](libvcs.git.GitRepo.convert_pip_url`) (``get_url_rev``)
15+
- [`GitRepo.get_revision`](libvcs.git.GitRepo.get_revision)
16+
- [`GitRepo.get_git_version`](libvcs.git.GitRepo.get_git_version)
1517
""" # NOQA: E501
1618
from __future__ import absolute_import, print_function, unicode_literals
1719

@@ -52,8 +54,7 @@ def extract_status(value) -> GitStatus:
5254
5355
Returns
5456
-------
55-
dict
56-
Dictionary of git repo's status
57+
Dictionary of git repo's status
5758
"""
5859
pattern = re.compile(
5960
r"""[\n\r]?

libvcs/hg.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# -*- coding: utf-8 -*-
22
"""Mercurial Repo object for libvcs.
33
4-
The following is from pypa/pip (MIT license):
4+
.. todo::
55
6-
- [`MercurialRepo.convert_pip_url`](libvcs.hg.convert_pip_url)
7-
- [`MercurialRepo.get_url`](libvcs.hg.MercurialRepo.get_url)
8-
- [`MercurialRepo.get_revision`](libvcs.hg.MercurialRepo.get_revision)
6+
The following is from pypa/pip (MIT license):
7+
8+
- [`MercurialRepo.convert_pip_url`](libvcs.hg.convert_pip_url)
9+
- [`MercurialRepo.get_url`](libvcs.hg.MercurialRepo.get_url)
10+
- [`MercurialRepo.get_revision`](libvcs.hg.MercurialRepo.get_revision)
911
""" # NOQA E5
1012
from __future__ import absolute_import, print_function, unicode_literals
1113

libvcs/shortcuts.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
"""Shortcuts"""
33
from __future__ import absolute_import, print_function, unicode_literals
44

5+
from typing import Union
6+
57
from libvcs import GitRepo, MercurialRepo, SubversionRepo
68
from libvcs.exc import InvalidPipURL, InvalidVCS
79

810

9-
def create_repo(url, vcs, **kwargs):
11+
def create_repo(url, vcs, **kwargs) -> Union[GitRepo, MercurialRepo, SubversionRepo]:
1012
r"""Return a object representation of a VCS repository.
1113
12-
Returns
13-
-------
14-
`libvcs.svn.SubversionRepo`, `libvcs.git.GitRepo`, or `libvcs.hg.MercurialRepo`.
15-
1614
Examples
1715
--------
18-
1916
>>> from libvcs.shortcuts import create_repo
2017
>>>
2118
>>> r = create_repo(
@@ -46,13 +43,11 @@ def create_repo(url, vcs, **kwargs):
4643
raise InvalidVCS('VCS %s is not a valid VCS' % vcs)
4744

4845

49-
def create_repo_from_pip_url(pip_url, **kwargs):
46+
def create_repo_from_pip_url(
47+
pip_url, **kwargs
48+
) -> Union[GitRepo, MercurialRepo, SubversionRepo]:
5049
r"""Return a object representation of a VCS repository via pip-style url.
5150
52-
Returns
53-
-------
54-
`libvcs.svn.SubversionRepo`, `libvcs.git.GitRepo`, or `libvcs.hg.MercurialRepo`.
55-
5651
Examples
5752
--------
5853

0 commit comments

Comments
 (0)