Files
konabot/scripts/watch_filter.py
passthem 3e5c1941c8
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
重构 ptimeparse 模块
2025-11-21 06:03:28 +08:00

17 lines
424 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
print(path)
return True