Settings: add documentation

The search_path attribute is now inside __init__() so it shows properly
in the generated documentation.
This commit is contained in:
Carlos Martín Nieto 2014-03-23 21:33:10 +01:00
parent 6bdb013592
commit 87c8aef7d9
3 changed files with 17 additions and 0 deletions

@ -45,6 +45,7 @@ Usage guide:
config
remotes
blame
settings
Indices and tables

8
docs/settings.rst Normal file

@ -0,0 +1,8 @@
**********************************************************************
Settings
**********************************************************************
.. contents::
.. autoclass:: pygit2.Settings
:members:

@ -38,6 +38,7 @@ class SearchPathList(object):
option(GIT_OPT_SET_SEARCH_PATH, key, value)
class Settings(object):
"""Library-wide settings"""
__slots__ = []
@ -45,10 +46,17 @@ class Settings(object):
@property
def search_path(self):
"""Configuration file search path.
This behaves like an array whose indices correspond to the
GIT_CONFIG_LEVEL_* values. The local search path cannot be
changed.
"""
return self._search_path
@property
def mwindow_size(self):
"""Maximum mmap window size"""
return option(GIT_OPT_GET_MWINDOW_SIZE)
@mwindow_size.setter