boa
boa copied to clipboard
Use watchfiles instead of watchgod
We use watchgod
here. It has been rewritten in watchfiles. I think we should update with this new dependency.
- https://watchfiles.helpmanual.io/migrating/
New api:
awatch(
*paths: Union[Path, str],
watch_filter: Optional[
Callable[[Change, str], bool]
] = DefaultFilter(),
debounce: int = 1600,
step: int = 50,
stop_event: Optional[AnyEvent] = None,
rust_timeout: Optional[int] = None,
yield_on_timeout: bool = False,
debug: bool = False,
raise_interrupt: Optional[bool] = None,
force_polling: Optional[bool] = None,
poll_delay_ms: int = 300,
recursive: bool = True
) -> AsyncGenerator[Set[FileChange], None]
https://watchfiles.helpmanual.io/api/watch/#watchfiles.awatch
Seems to be only 1 usage: https://github.com/mamba-org/boa/blob/54468bdd0f117cd09293791c0bda6e4457052ace/boa/tui/tui.py#L255-L262