Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/config.py @ 525:be6ef72c55d5
Change Configuration.expand_variable() to Configuration.interpolate_variables()
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Mon, 20 Dec 2021 12:43:17 +0100 |
| parents | 09b8e28b7a44 |
| children | 48990863b905 |
line wrap: on
line diff
--- a/configmix/config.py Mon Dec 20 02:00:03 2021 +0100 +++ b/configmix/config.py Mon Dec 20 12:43:17 2021 +0100 @@ -753,7 +753,7 @@ ty = type(obj) if issubclass(ty, _TEXTTYPE): # a string - really replace the value - return self.expand_variable(obj) + return self.interpolate_variables(obj) elif issubclass(ty, dict): newdict = ty() for k, v in obj.items(): @@ -770,8 +770,8 @@ else: return obj - def expand_variable(self, s): - """Expand variables in the single string `s`""" + def interpolate_variables(self, s): + """Expand all variables in the single string `s`""" start = s.find(_STARTTOK, 0) if start < 0: return s
