Change to:

```python
# length element was added to the end of the tuple, for backward compatibility with existing linters
# that override split_match check the tuple length.
for errors in self.find_errors(output):
    match, line, col, error, warning, message, near = errors[0:7]
    length = errors[7] if len(errors) >= 8 else None
```

Besides being a lot less code, you weren't initializing length if it wasn't in the tuple, which would break the test `if length is not None` later on.