Translate lines with ?/?? at the end
(line)
| 341 | |
| 342 | @StatelessInputTransformer.wrap |
| 343 | def help_end(line): |
| 344 | """Translate lines with ?/?? at the end""" |
| 345 | m = _help_end_re.search(line) |
| 346 | if m is None or ends_in_comment_or_string(line): |
| 347 | return line |
| 348 | target = m.group(1) |
| 349 | esc = m.group(3) |
| 350 | lspace = _initial_space_re.match(line).group(0) |
| 351 | |
| 352 | # If we're mid-command, put it back on the next prompt for the user. |
| 353 | next_input = line.rstrip('?') if line.strip() != m.group(0) else None |
| 354 | |
| 355 | return _make_help_call(target, esc, lspace, next_input) |
| 356 | |
| 357 | |
| 358 | @CoroutineInputTransformer.wrap |
no test coverage detected