Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/config.py @ 311:035b42a224ed
Docu
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 28 Apr 2021 09:23:14 +0200 |
| parents | 801cd16223e4 |
| children | 043a6412be3c |
comparison
equal
deleted
inserted
replaced
| 310:801cd16223e4 | 311:035b42a224ed |
|---|---|
| 192 return default | 192 return default |
| 193 return v | 193 return v |
| 194 | 194 |
| 195 def _lookupref(self, key, default=_MARKER): | 195 def _lookupref(self, key, default=_MARKER): |
| 196 """ | 196 """ |
| 197 `key` must be a reference URI without any (namespace) prefixes | 197 |
| 198 and suffixes | 198 `key` must be a configuration reference URI without any |
| 199 (namespace) prefixes and suffixes | |
| 199 | 200 |
| 200 """ | 201 """ |
| 201 return self.expand_ref_uri(key, default=default) | 202 return self.expand_ref_uri(key, default=default) |
| 202 | 203 |
| 203 def expand_if_reference(self, v, default=_MARKER): | 204 def expand_if_reference(self, v, default=_MARKER): |
| 204 """Check whether `v` is a reference and -- if true -- then expand it. | 205 """Check whether `v` is a configuration reference and -- if true -- |
| 206 then expand it. | |
| 205 | 207 |
| 206 `v` must match the pattern ``{{ref:<REFERENCE>}}`` | 208 `v` must match the pattern ``{{ref:<REFERENCE>}}`` |
| 207 | 209 |
| 208 All non-matching texttypes and all non-texttypes are returned | 210 All non-matching texttypes and all non-texttypes are returned |
| 209 unchanged. | 211 unchanged. |
