Skip to content

Commit

Permalink
fix: python module HMR weird behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
CNSeniorious000 committed Aug 23, 2024
1 parent 9b42bbd commit d2f0161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reasonify-headless/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@

if __debug__:
for module in tuple(sys.modules): # for HMR
if module.startswith("reasonify"):
sys.modules.pop(module).__dict__.clear()
if module.startswith("reasonify") or module.startswith("promplate_recipes"):
del sys.modules[module]

0 comments on commit d2f0161

Please sign in to comment.