Fix error patterns in flake8 checker