Skip to content

Commit 0cef772

Browse files
fix: sys_path should be in the HMR_CONTEXT scope
1 parent 26bd99c commit 0cef772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/hmr/reactivity/hmr/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def exec_module(self, module: ModuleType):
144144
module.load()
145145

146146

147-
@Dirty
147+
@partial(Dirty, context=HMR_CONTEXT)
148148
def sys_path(): # TODO: Path(".") may change too
149149
return [*sys.path]
150150

@@ -158,7 +158,7 @@ def __init__(self, includes: Iterable[str] = ".", excludes: Iterable[str] = ()):
158158
def _accept(self, path: Path):
159159
return path.is_file() and not is_relative_to_any(path, self.excludes) and is_relative_to_any(path, self.includes)
160160

161-
@DerivedProperty
161+
@partial(DerivedProperty, context=HMR_CONTEXT)
162162
def search_paths(self):
163163
# FIXME: Handle case where `includes` contains file paths, not just directories
164164
# Currently we assume `includes` never specify individual files

0 commit comments

Comments
 (0)