Files
konabot/scripts/watch_filter.py
passthem eb8bf16346
All checks were successful
continuous-integration/drone/push Build is passing
能不能给此方bot加上这个 by 蜡笔
2025-12-31 15:02:08 +08:00

20 lines
585 B
Python

from pathlib import Path
from watchfiles import Change
base = Path(__file__).parent.parent.absolute()
def filter(change: Change, path: str) -> bool:
if "__pycache__" in path:
return False
if Path(path).absolute().is_relative_to((base / "data").absolute()):
return False
if Path(path).absolute().is_relative_to((base / ".git").absolute()):
return False
if Path(path).absolute().is_relative_to((base / "assets" / "oracle" / "image").absolute()):
# 还要解决坏枪的这个问题
return False
print(path)
return True