hmr 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hmr-0.2.0 → hmr-0.2.1}/PKG-INFO +1 -1
- {hmr-0.2.0 → hmr-0.2.1}/pyproject.toml +1 -1
- {hmr-0.2.0 → hmr-0.2.1}/reactivity/hmr.py +5 -4
- {hmr-0.2.0 → hmr-0.2.1}/reactivity/__init__.py +0 -0
- {hmr-0.2.0 → hmr-0.2.1}/reactivity/functional.py +0 -0
- {hmr-0.2.0 → hmr-0.2.1}/reactivity/helpers.py +0 -0
- {hmr-0.2.0 → hmr-0.2.1}/reactivity/primitives.py +0 -0
{hmr-0.2.0 → hmr-0.2.1}/PKG-INFO
RENAMED
@@ -8,6 +8,7 @@ from importlib.util import spec_from_loader
|
|
8
8
|
from inspect import currentframe
|
9
9
|
from pathlib import Path
|
10
10
|
from runpy import run_path
|
11
|
+
from site import getsitepackages
|
11
12
|
from types import ModuleType, TracebackType
|
12
13
|
from typing import Any
|
13
14
|
|
@@ -115,7 +116,7 @@ class ReactiveModuleFinder(MetaPathFinder):
|
|
115
116
|
def __init__(self, includes: Iterable[str] = ".", excludes: Iterable[str] = ()):
|
116
117
|
super().__init__()
|
117
118
|
self.includes = [Path(i).resolve() for i in includes]
|
118
|
-
self.excludes = [Path(e).resolve() for e in excludes]
|
119
|
+
self.excludes = [Path(e).resolve() for e in (*excludes, *getsitepackages())]
|
119
120
|
|
120
121
|
def _accept(self, path: Path):
|
121
122
|
return path.is_file() and not is_relative_to_any(path, self.excludes) and is_relative_to_any(path, self.includes)
|
@@ -149,7 +150,7 @@ def patch_module(name_or_module: str | ModuleType):
|
|
149
150
|
return m
|
150
151
|
|
151
152
|
|
152
|
-
def patch_meta_path(includes: Iterable[str] = (".",), excludes: Iterable[str] = (
|
153
|
+
def patch_meta_path(includes: Iterable[str] = (".",), excludes: Iterable[str] = ()):
|
153
154
|
sys.meta_path.insert(0, ReactiveModuleFinder(includes, excludes))
|
154
155
|
|
155
156
|
|
@@ -281,7 +282,7 @@ def cli():
|
|
281
282
|
if not (path := Path(entry)).is_file():
|
282
283
|
raise FileNotFoundError(path.resolve())
|
283
284
|
sys.path.insert(0, ".")
|
284
|
-
SyncReloader(entry
|
285
|
+
SyncReloader(entry).keep_watching_until_interrupt()
|
285
286
|
|
286
287
|
|
287
|
-
__version__ = "0.2.
|
288
|
+
__version__ = "0.2.1"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|