Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions taskiq/cli/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ def __init__(
) -> None:
self.callback = callback
self.gitignore = None
gpath = path / ".gitignore"
if use_gitignore and gpath.exists():
self.gitignore = parse_gitignore(gpath)
project_root = Path().resolve()
path = path.resolve()

if use_gitignore:
while path != project_root.parent:
gpath = path / ".gitignore"
if gpath.exists():
self.gitignore = parse_gitignore(gpath)
break
path = path.parent

self.callback_kwargs = callback_kwargs

def dispatch(self, event: FileSystemEvent) -> None:
Expand Down