Provide a doc example for discover_repository
To clarify the behaviour and usage.
This commit is contained in:
@@ -33,6 +33,11 @@ Functions
|
|||||||
|
|
||||||
.. autofunction:: pygit2.discover_repository
|
.. autofunction:: pygit2.discover_repository
|
||||||
|
|
||||||
|
Example::
|
||||||
|
|
||||||
|
>>> current_working_directory = os.getcwd()
|
||||||
|
>>> repository_path = discover_repository(current_working_directory)
|
||||||
|
>>> repo = Repository(repository_path)
|
||||||
|
|
||||||
|
|
||||||
The Repository class
|
The Repository class
|
||||||
|
Reference in New Issue
Block a user