Move ReloadManager logic into __main__.py

Since the reload logic no longer relies on any state, the relevant loop is simple enough that it feels clearest to include it in the main entry point file.
This commit is contained in:
Grant Sanderson
2024-12-10 15:46:17 -06:00
parent 24697377db
commit 8cf95ec9a4
3 changed files with 45 additions and 69 deletions

View File

@ -145,6 +145,9 @@ class ModuleLoader:
ignore_manimlib_modules = get_global_config()["ignore_manimlib_modules_on_reload"]
if ignore_manimlib_modules and module.__name__.startswith("manimlib"):
return
if module.__name__.startswith("manimlib.config"):
# We don't want to reload global config
return
if not hasattr(module, "__dict__"):
return