Gets a directive from the start of the line. If the line is ":param str foo: Description of foo", then _get_directive(line_info) returns "param str foo". Args: line_info: Information about the current line. Returns: The contents of a directive, or None if the line doesn't start wit
(line_info)
| 676 | |
| 677 | |
| 678 | def _get_directive(line_info): |
| 679 | """Gets a directive from the start of the line. |
| 680 | |
| 681 | If the line is ":param str foo: Description of foo", then |
| 682 | _get_directive(line_info) returns "param str foo". |
| 683 | |
| 684 | Args: |
| 685 | line_info: Information about the current line. |
| 686 | Returns: |
| 687 | The contents of a directive, or None if the line doesn't start with a |
| 688 | directive. |
| 689 | """ |
| 690 | if line_info.stripped.startswith(':'): |
| 691 | return line_info.stripped.split(':', 2)[1] |
| 692 | else: |
| 693 | return None |
| 694 | |
| 695 | |
| 696 | def _get_after_directive(line_info): |
no outgoing calls
no test coverage detected