Intended reload behaviour

Hello,

The documentation hints that --reload will only watch python files.

In version 0.11.8, StatReload and WatchGodReload have different behaviours:

  • StatReload only watches .py files.
  • WatchGodReload watches most files except .dotted files.

Based on this pull request, I think both should only watch python files for now. A quick fix would be using watchgod’s PythonWatcher.

Running the same tests against StatReload and WatchGodReload could ensure they behave the same.

Uvicorn not reloading app on changes to configuration/template/graphql/translation files is a major pain point for developers, so I’m arguing that current state of affairs is preferable to rolling back WatchGod changes.