Skip to content

Commit 87c8aef

Browse files
committed
Settings: add documentation
The search_path attribute is now inside __init__() so it shows properly in the generated documentation.
1 parent 6bdb013 commit 87c8aef

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Usage guide:
4545
config
4646
remotes
4747
blame
48+
settings
4849

4950

5051
Indices and tables

docs/settings.rst

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
**********************************************************************
2+
Settings
3+
**********************************************************************
4+
5+
.. contents::
6+
7+
.. autoclass:: pygit2.Settings
8+
:members:

pygit2/settings.py

+8
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,25 @@ def __setitem__(self, key, value):
3838
option(GIT_OPT_SET_SEARCH_PATH, key, value)
3939

4040
class Settings(object):
41+
"""Library-wide settings"""
4142

4243
__slots__ = []
4344

4445
_search_path = SearchPathList()
4546

4647
@property
4748
def search_path(self):
49+
"""Configuration file search path.
50+
51+
This behaves like an array whose indices correspond to the
52+
GIT_CONFIG_LEVEL_* values. The local search path cannot be
53+
changed.
54+
"""
4855
return self._search_path
4956

5057
@property
5158
def mwindow_size(self):
59+
"""Maximum mmap window size"""
5260
return option(GIT_OPT_GET_MWINDOW_SIZE)
5361

5462
@mwindow_size.setter

0 commit comments

Comments
 (0)