Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/variables.py @ 360:d2751a80d9b7
Docu: fix link to KeyError in the new filter function implementations
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 25 Jun 2021 00:56:22 +0200 |
| parents | dd454e1efea4 |
| children | 6b3da9e5acc6 |
comparison
equal
deleted
inserted
replaced
| 359:ce2a8f5a2fb2 | 360:d2751a80d9b7 |
|---|---|
| 246 | 246 |
| 247 @filter(text_to_native_os_str(NONE_FILTER, encoding="ascii")) | 247 @filter(text_to_native_os_str(NONE_FILTER, encoding="ascii")) |
| 248 def None_filter_impl(config, v): | 248 def None_filter_impl(config, v): |
| 249 """Identity. | 249 """Identity. |
| 250 | 250 |
| 251 The `None` filter is just a marker to not throw `KeyError` but return | 251 The `None` filter is just a marker to not throw :exc:`KeyError` |
| 252 `None`. | 252 but return `None`. |
| 253 | 253 |
| 254 """ | 254 """ |
| 255 return v | 255 return v |
| 256 | 256 |
| 257 | 257 |
| 258 @filter(text_to_native_os_str(EMPTY_FILTER, encoding="ascii")) | 258 @filter(text_to_native_os_str(EMPTY_FILTER, encoding="ascii")) |
| 259 def Empty_filter_impl(config, v): | 259 def Empty_filter_impl(config, v): |
| 260 """Identity. | 260 """Identity. |
| 261 | 261 |
| 262 The `Empty` filter is just a marker to not throw `KeyError` but return | 262 The `Empty` filter is just a marker to not throw :exc:`KeyError` |
| 263 the empty string. | 263 but return the empty string. |
| 264 | 264 |
| 265 """ | 265 """ |
| 266 return v | 266 return v |
| 267 | 267 |
| 268 | 268 |
