|
@@ -300,9 +300,9 @@ def get_reload_paths() -> Sequence[Path]:
|
|
|
The reload paths for the backend.
|
|
|
"""
|
|
|
config = get_config()
|
|
|
- reload_paths = [Path(config.app_name).parent]
|
|
|
- if config.app_module is not None and config.app_module.__file__:
|
|
|
- module_path = Path(config.app_module.__file__).resolve().parent
|
|
|
+ reload_paths = [Path.cwd()]
|
|
|
+ if (spec := importlib.util.find_spec(config.module)) is not None and spec.origin:
|
|
|
+ module_path = Path(spec.origin).resolve().parent
|
|
|
|
|
|
while module_path.parent.name and any(
|
|
|
sibling_file.name == "__init__.py"
|