Returns True if current position is at start of line. Allows for up to three blank spaces at start of line.
(self)
| 192 | return self.lineno_start_cache[self.lineno-1] |
| 193 | |
| 194 | def at_line_start(self) -> bool: |
| 195 | """ |
| 196 | Returns True if current position is at start of line. |
| 197 | |
| 198 | Allows for up to three blank spaces at start of line. |
| 199 | """ |
| 200 | if self.offset == 0: |
| 201 | return True |
| 202 | if self.offset > 3: |
| 203 | return False |
| 204 | # Confirm up to first 3 chars are whitespace |
| 205 | return self.rawdata[self.line_offset:self.line_offset + self.offset].strip() == '' |
| 206 | |
| 207 | def get_endtag_text(self, tag: str) -> str: |
| 208 | """ |
no outgoing calls
no test coverage detected