mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-06-24 01:18:22 -04:00
distro/repo_config: ReposConfigFile: default to allow_extra=True
This commit is contained in:
parent
bfa027d08a
commit
923a16f8f6
1 changed files with 5 additions and 2 deletions
|
@ -51,8 +51,8 @@ class ReposConfigFile(DictScheme):
|
|||
_strip_hidden: ClassVar[bool] = True
|
||||
_sparse: ClassVar[bool] = True
|
||||
|
||||
def __init__(self, d, **kwargs):
|
||||
super().__init__(d=d, **kwargs)
|
||||
def __init__(self, d, *, allow_extra: bool = True, **kwargs):
|
||||
super().__init__(d=d, allow_extra=allow_extra, **kwargs)
|
||||
self[REPOS_KEY] = self.get(REPOS_KEY, {})
|
||||
for repo_cls, defaults, repos, remote_url in [
|
||||
(RepoConfig, REPO_DEFAULTS, self.get(REPOS_KEY), d.get(REMOTEURL_KEY, None)),
|
||||
|
@ -66,6 +66,9 @@ class ReposConfigFile(DictScheme):
|
|||
_repo[REMOTEURL_KEY] = remote_url
|
||||
repos[name] = repo_cls(_repo, **kwargs)
|
||||
|
||||
def update(self, *kargs, allow_extra: bool = True, **kwargs):
|
||||
return super().update(*kargs, allow_extra=allow_extra, **kwargs) # type: ignore[misc]
|
||||
|
||||
@staticmethod
|
||||
def parse_config(path: str) -> ReposConfigFile:
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue