Mercurial > hgrepos > Python > libs > ConfigMix
changeset 518:55b8aed70f7d
Remove unneeded "default" keyword argument for Configuration._lookupref() and Configuration.expand_ref_uri()
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 19 Dec 2021 16:33:31 +0100 |
| parents | 328af767f5f8 |
| children | df0bb39617d6 |
| files | configmix/config.py |
| diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/configmix/config.py Sun Dec 19 16:04:40 2021 +0100 +++ b/configmix/config.py Sun Dec 19 16:33:31 2021 +0100 @@ -690,14 +690,14 @@ self.__cache[path] = v return v - def _lookupref(self, key, default=_MARKER): + def _lookupref(self, key): """ `key` must be a configuration reference URI without any (namespace) prefixes and suffixes """ - return self.expand_ref_uri(key, default=default) + return self.expand_ref_uri(key) def expand_if_reference(self, v): """Check whether `v` is a configuration reference and -- if true -- @@ -719,7 +719,7 @@ else: return v - def expand_ref_uri(self, uri, default=_MARKER): + def expand_ref_uri(self, uri): pu = urlsplit(uri) if pu.scheme or pu.netloc or pu.path or pu.query: raise ValueError("only fragment-only URIs are supported") @@ -727,7 +727,7 @@ return self if pu.fragment.startswith(_DOT): raise ValueError("relative refs not supported") - return self.getvar(pu.fragment, default=default) + return self.getvar(pu.fragment) def substitute_variables_in_obj(self, obj): """Recursively expand variables in the object tree `obj`."""
