We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f64ae2 commit ab31bfbCopy full SHA for ab31bfb
1 file changed
entangled/commands/watch.py
@@ -8,6 +8,12 @@
8
import watchfiles
9
10
11
+def watch_filter(change: watchfiles.Change, path: str) -> bool:
12
+ if path.startswith(".entangled"):
13
+ return False
14
+ return True
15
+
16
17
def _watch(_stop_event: Event | None = None, _start_event: Event | None = None):
18
"""Keep a loop running, watching for changes. This interface is separated
19
from the CLI one, so that it can be tested using threading instead of
@@ -23,7 +29,7 @@ def stop() -> bool:
23
29
24
30
dirs = "." # find_watch_dirs()
25
31
26
- for changes in watchfiles.watch(dirs, stop_event=_stop_event):
32
+ for changes in watchfiles.watch(dirs, stop_event=_stop_event, watch_filter=watch_filter):
27
33
run_sync()
28
34
35
0 commit comments