class documentation
class ConfigDict(Config):
Known subclasses: dulwich.config.ConfigFile
Constructor: ConfigDict(values, encoding)
Git configuration stored in a dictionary.
| Method | __delitem__ |
Delete a configuration section. |
| Method | __eq__ |
Check equality with another ConfigDict. |
| Method | __getitem__ |
Get configuration values for a section. |
| Method | __init__ |
Create a new ConfigDict. |
| Method | __iter__ |
Iterate over configuration sections. |
| Method | __len__ |
Return the number of sections. |
| Method | __repr__ |
Return string representation of ConfigDict. |
| Method | __setitem__ |
Set configuration values for a section. |
| Method | add |
Add a value to a configuration setting, creating a multivar if needed. |
| Method | get |
Get a configuration value. |
| Method | get |
Get multiple values for a configuration setting. |
| Method | items |
Get items in a section. |
| Method | keys |
Return a view of section names. |
| Method | remove |
Remove a configuration setting. |
| Method | sections |
Get all sections. |
| Method | set |
Set a configuration value. |
| Instance Variable | encoding |
Undocumented |
| Class Method | _parse |
Undocumented |
| Method | _check |
Undocumented |
| Instance Variable | _values |
Undocumented |
Inherited from Config:
| Method | get |
Retrieve a configuration setting as boolean. |
| Method | has |
Check if a specified section exists. |
def __init__(self, values:
MutableMapping[ Section, CaseInsensitiveOrderedMultiDict[ Name, Value]] | None = None, encoding: str | None = None):
¶
overridden in
dulwich.config.ConfigFileCreate a new ConfigDict.
overrides
dulwich.config.Config.getGet a configuration value.
| Parameters | |
section:SectionLike | Section name |
name:NameLike | Setting name |
| Returns | |
Value | Configuration value |
| Raises | |
KeyError | if the value is not set |
overrides
dulwich.config.Config.get_multivarGet multiple values for a configuration setting.
| Parameters | |
section:SectionLike | Section name |
name:NameLike | Setting name |
| Returns | |
Iterator[ | Iterator of configuration values |
Remove a configuration setting.
| Parameters | |
section:SectionLike | Section name |
name:NameLike | Setting name |
| Raises | |
KeyError | If the section or name doesn't exist |
overrides
dulwich.config.Config.setSet a configuration value.
| Parameters | |
section:SectionLike | Section name |
name:NameLike | Setting name |
value:ValueLike | bool | Configuration value |