| Conditions | 5 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import functools |
||
| 18 | @functools.wraps(f) |
||
| 19 | def _wrapper(self, *args): |
||
| 20 | def _replace(arg): |
||
| 21 | for rule in rules: |
||
| 22 | if arg.startswith(rule): |
||
| 23 | return arg.replace(rule, rules[rule]) |
||
| 24 | return arg |
||
| 25 | rules = getattr(self, attribute) |
||
| 26 | if not rules: |
||
| 27 | return f(self, *args) |
||
| 28 | return map(_replace, f(self, *args)) |
||
| 29 | return _wrapper |
||
| 31 |