Settings: add documentation
The search_path attribute is now inside __init__() so it shows properly in the generated documentation.
This commit is contained in:
@@ -45,6 +45,7 @@ Usage guide:
|
|||||||
config
|
config
|
||||||
remotes
|
remotes
|
||||||
blame
|
blame
|
||||||
|
settings
|
||||||
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
|
8
docs/settings.rst
Normal file
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)
|
option(GIT_OPT_SET_SEARCH_PATH, key, value)
|
||||||
|
|
||||||
class Settings(object):
|
class Settings(object):
|
||||||
|
"""Library-wide settings"""
|
||||||
|
|
||||||
__slots__ = []
|
__slots__ = []
|
||||||
|
|
||||||
@@ -45,10 +46,17 @@ class Settings(object):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def search_path(self):
|
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
|
return self._search_path
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mwindow_size(self):
|
def mwindow_size(self):
|
||||||
|
"""Maximum mmap window size"""
|
||||||
return option(GIT_OPT_GET_MWINDOW_SIZE)
|
return option(GIT_OPT_GET_MWINDOW_SIZE)
|
||||||
|
|
||||||
@mwindow_size.setter
|
@mwindow_size.setter
|
||||||
|
Reference in New Issue
Block a user