Settings: add documentation
The search_path attribute is now inside __init__() so it shows properly in the generated documentation.
This commit is contained in:
parent
6bdb013592
commit
87c8aef7d9
@ -45,6 +45,7 @@ Usage guide:
|
||||
config
|
||||
remotes
|
||||
blame
|
||||
settings
|
||||
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user