It appears the latest version of flake8 isn't totally compatible with pytest. https://github.com/tholo/pytest-flake8/issues/87#issuecomment-1201760236