(self, line_num, line)
| 141 | return next_line.strip().startswith('"') |
| 142 | |
| 143 | def process_line(self, line_num, line): |
| 144 | line = line.rstrip() |
| 145 | comment_match = COMMENT_RE.match(line) |
| 146 | def_match = CONVERTIBLE_DEF_RE.match(line) |
| 147 | |
| 148 | # First check if this is a comment line. |
| 149 | if comment_match: |
| 150 | if self.done_with_initial_comment: |
| 151 | self.queue_comment_line(line) |
| 152 | else: |
| 153 | self.output_line(line) |
| 154 | else: |
| 155 | # If not a comment line, then by definition we're done with the comment header. |
| 156 | self.done_with_initial_comment = True |
| 157 | if not line.strip(): |
| 158 | self.handle_empty_line(line) |
| 159 | elif def_match and not self.is_next_line_doc_comment(): |
| 160 | # We got something we can make a docstring for: |
| 161 | # print the thing the docstring is for first, |
| 162 | # then the converted comment. |
| 163 | |
| 164 | indent = def_match.group('indentation') |
| 165 | self.output_line(line) |
| 166 | self.dump_converted_comment_lines(indent) |
| 167 | else: |
| 168 | # Can't make a docstring for this line: |
| 169 | self.output_normal_line(line) |
| 170 | |
| 171 | def process(self, fn, write=False): |
| 172 | self.process_file(fn) |
nothing calls this directly
no test coverage detected