nb_cli.handlers.reloader

class FileFilter(includes=None, excludes=None)

  • 参数

    • includes (list[str] | None)

    • excludes (list[str] | None)

class Reloader(startup_func, shutdown_func, reload_dirs=None, file_filter=None, cwd=None, stdout=None)

  • 参数

    • startup_func (() -> Coroutine[Any, Any, asyncio.subprocess.Process])

    • shutdown_func ((asyncio.subprocess.Process) -> Coroutine[Any, Any, None])

    • reload_dirs (list[Path] | None)

    • file_filter (FileFilter | None)

    • cwd (Path | None)

    • stdout (IO[Any] | None)

async method run()

  • 参数

    empty

  • 返回

    • None

async method startup()

  • 参数

    empty

  • 返回

    • None

async method restart()

  • 参数

    empty

  • 返回

    • None

async method shutdown()

  • 参数

    empty

  • 返回

    • None

async method should_restart()

  • 参数

    empty

  • 返回

    • list[Path] | None

method handle_exit(sig, frame)

  • 参数

    • sig

    • frame

  • 返回

    • untyped