Return the value for the ``name`` attribute collected using the ``matcher`` regex in the ``line`` text.
(name, matcher, line, clean=True)
| 74 | |
| 75 | |
| 76 | def get_value(name, matcher, line, clean=True): |
| 77 | """ |
| 78 | Return the value for the ``name`` attribute collected using the ``matcher`` |
| 79 | regex in the ``line`` text. |
| 80 | """ |
| 81 | match = matcher.match(line) |
| 82 | if match: |
| 83 | value = match.group(name) |
| 84 | return get_cleaned_string(value) if clean else value |
| 85 | |
| 86 | |
| 87 | # FIXME: this does not smell right as we ignore the matched value |
no test coverage detected