Tests fail if building Sphinx documentation reports warnings.
Fixed compliance to latest flake8.