reload

janim.utils.reload.reloads()

In general, when using import, already loaded modules will not be reloaded, causing rebuild to fail to respond to changes in external files.

For example, in the following code, rebuild cannot respond to changes in your_custom_module

from janim.imports import *

from your_custom_module import *

At this point, you can use with reloads(): to force the import statements inside to reload modules, enabling response to changes in external files, as shown in the following code

from janim.imports import *

with reloads():
    from your_custom_module import *

However, IDE highlighting and completion for imports wrapped by reloads() may be missing; you may avoid this with the following approach:

from janim.imports import *

with reloads():
    from your_custom_module import *
from your_custom_module import *
janim.utils.reload.reset_reloads_state() None