From cb2e7df96a065a7ad15115b1137b4ec01039b7ea Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 11 Feb 2025 17:47:44 -0800 Subject: [PATCH] invert logic of default hot reload exclusion (#4807) * invert logic of default hot reload exclusion * console debug reload paths --- reflex/utils/exec.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py index 3e729cbf8..b16aaea1c 100644 --- a/reflex/utils/exec.py +++ b/reflex/utils/exec.py @@ -278,7 +278,7 @@ def get_reload_paths() -> Sequence[Path]: if path.name.startswith("__"): # ignore things like __pycache__ return True - return path.name not in (".gitignore", "uploaded_files") + return path.name in (".gitignore", "uploaded_files") reload_paths = ( tuple( @@ -297,6 +297,8 @@ def get_reload_paths() -> Sequence[Path]: if all(not path.samefile(exclude) for exclude in exclude_dirs) ) + console.debug(f"Reload paths: {list(map(str, reload_paths))}") + return reload_paths