class documentation

A Git configuration.

Method get Retrieve the contents of a configuration setting.
Method get_boolean Retrieve a configuration setting as boolean.
Method get_multivar Retrieve the contents of a multivar configuration setting.
Method has_section 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.
def get(self, section, name):

Retrieve the contents of a configuration setting.

Parameters
section:SectionLikeTuple with section name and optional subsection name
name:NameLikeVariable name
Returns
ValueContents of the setting
Raises
KeyErrorif the value is not set
def get_boolean(self, section, name, default=None):

Retrieve a configuration setting as boolean.

Parameters
section:SectionLikeTuple with section name and optional subsection name
name:NameLikeName of the setting, including section and possible subsection.
default:Optional[bool]Undocumented
Returns
Optional[bool]Contents of the setting
def get_multivar(self, section, name):

Retrieve the contents of a multivar configuration setting.

Parameters
section:SectionLikeTuple with section name and optional subsection namee
name:NameLikeVariable name
Returns
Iterator[Value]Contents of the setting as iterable
Raises
KeyErrorif the value is not set
def has_section(self, name):

Check if a specified section exists.

Parameters
name:SectionName of section to check for
Returns
boolboolean indicating whether the section exists
def items(self, section):

Iterate over the configuration pairs for a specific section.

Parameters
section:SectionLikeTuple with section name and optional subsection namee
Returns
Iterator[Tuple[Name, Value]]Iterator over (name, value) pairs
def sections(self):

Iterate over the sections.

Returns: Iterator over section tuples

Returns
Iterator[Section]Undocumented
def set(self, section, name, value):

Set a configuration value.

Parameters
section:SectionLikeTuple with section name and optional subsection namee
name:NameLikeName of the configuration value, including section and optional subsection
value:Union[ValueLike, bool]value of the setting