Skip to content

Commit 5a421db

Browse files
committed
tests(cmd[git]): Doctest updates
1 parent c8f7c25 commit 5a421db

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

src/libvcs/cmd/git.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(
2424
dir: StrPath,
2525
progress_callback: Optional[ProgressCallbackProtocol] = None,
2626
) -> None:
27-
"""Lite, typed, pythonic wrapper for git(1).
27+
r"""Lite, typed, pythonic wrapper for git(1).
2828
2929
Parameters
3030
----------
@@ -33,8 +33,28 @@ def __init__(
3333
3434
Examples
3535
--------
36-
>>> Git(dir=tmp_path)
36+
>>> git = Git(dir=git_local_clone.dir)
37+
>>> git
3738
<Git dir=...>
39+
40+
Subcommands:
41+
42+
>>> git.remote.show()
43+
'origin'
44+
45+
>>> git.remote.add(
46+
... name='my_remote', url=f'file:///dev/null'
47+
... )
48+
''
49+
50+
>>> git.remote.show()
51+
'my_remote\norigin'
52+
53+
>>> git.stash.save(message="Message")
54+
'No local changes to save'
55+
56+
>>> git.submodule.init()
57+
''
3858
"""
3959
#: Directory to check out
4060
self.dir: pathlib.Path

0 commit comments

Comments
 (0)