@task
def watch_docs():
    """Run build the docs when a file changes."""
    try:
        import sphinx_autobuild  # noqa
    except __HOLE__:
        print('ERROR: watch task requires the sphinx_autobuild package.')
        print('Install it with:')
        print('    pip install sphinx-autobuild')
        sys.exit(1)
    docs()
    run('sphinx-autobuild {} {}'.format(docs_dir, build_dir), pty=True)
dataset/ETHPy150Open jmcarp/nplusone/tasks.py/watch_docs