def task_flake8(output_file):
    """Run flake8 over the code base and benchmarks."""
    opts = ''
    if output_file:
        opts += f'--output-file={output_file}'
    return {
        'actions': [f"flake8 {opts} scipy benchmarks/benchmarks"],
        'doc': 'Lint scipy and benchmarks directory',
    }