class documentation

Configuration which reads from multiple config files..

Class Method default Create a StackedConfig with default system/user config files.
Class Method default_backends Retrieve the default configuration.
Method __init__ Initialize a StackedConfig.
Method __repr__ Return string representation of StackedConfig.
Method get Get value from configuration.
Method get_multivar Get multiple values from configuration.
Method sections Get all sections.
Method set Set value in configuration.
Instance Variable backends Undocumented
Instance Variable writable Undocumented

Inherited from Config:

Method get_boolean Retrieve a configuration setting as boolean.
Method has_section Check if a specified section exists.
Method items Iterate over the configuration pairs for a specific section.
def default(cls) -> StackedConfig:

Create a StackedConfig with default system/user config files.

Returns
StackedConfigStackedConfig with default configuration files loaded
def default_backends(cls) -> list[ConfigFile]:

Retrieve the default configuration.

See git-config(1) for details on the files searched.

def __init__(self, backends: list[ConfigFile], writable: ConfigFile | None = None):

Initialize a StackedConfig.

Parameters
backends:list[ConfigFile]List of config files to read from (in order of precedence)
writable:ConfigFile | NoneOptional config file to write changes to
def __repr__(self) -> str:

Return string representation of StackedConfig.

def get(self, section: SectionLike, name: NameLike) -> Value:

Get value from configuration.

def get_multivar(self, section: SectionLike, name: NameLike) -> Iterator[Value]:

Get multiple values from configuration.

def sections(self) -> Iterator[Section]:

Get all sections.

def set(self, section: SectionLike, name: NameLike, value: ValueLike | bool):

Set value in configuration.

backends =

Undocumented

writable =

Undocumented