class documentation
class Config(object):
Known subclasses: dulwich.config.ConfigDict
, dulwich.config.StackedConfig
A Git configuration.
Method | get |
Retrieve the contents of a configuration setting. |
Method | get |
Retrieve a configuration setting as boolean. |
Method | get |
Retrieve the contents of a multivar configuration setting. |
Method | has |
Check if a specified section exists. |
Method | items |
Iterate over the configuration pairs for a specific section. |
Method | sections |
Iterate over the sections. |
Method | set |
Set a configuration value. |
overridden in
dulwich.config.ConfigDict
, dulwich.config.StackedConfig
Retrieve the contents of a configuration setting.
Parameters | |
section:SectionLike | Tuple with section name and optional subsection name |
name:NameLike | Variable name |
Returns | |
Value | Contents of the setting |
Raises | |
KeyError | if the value is not set |
overridden in
dulwich.config.ConfigDict
, dulwich.config.StackedConfig
Retrieve the contents of a multivar configuration setting.
Parameters | |
section:SectionLike | Tuple with section name and optional subsection namee |
name:NameLike | Variable name |
Returns | |
Iterator[ | Contents of the setting as iterable |
Raises | |
KeyError | if the value is not set |
overridden in
dulwich.config.ConfigDict
Iterate over the configuration pairs for a specific section.
Parameters | |
section:SectionLike | Tuple with section name and optional subsection namee |
Returns | |
Iterator[ | Iterator over (name, value) pairs |
overridden in
dulwich.config.ConfigDict
, dulwich.config.StackedConfig
Set a configuration value.
Parameters | |
section:SectionLike | Tuple with section name and optional subsection namee |
name:NameLike | Name of the configuration value, including section and optional subsection |
value:Union[ | value of the setting |