from reactivity.hmr.core import *¶
STATIC_ATTRS
module-attribute
¶
STATIC_ATTRS = frozenset(
(
"__path__",
"__dict__",
"__spec__",
"__name__",
"__file__",
"__loader__",
"__package__",
"__cached__",
)
)
_loader
module-attribute
¶
_loader = ReactiveModuleLoader()
__version__
module-attribute
¶
__version__ = '0.7.6.2'
Name
¶
Bases: Signal, BaseDerived
Source code in reactivity/hmr/core.py
33 34 35 36 |
|
get
¶
get(track=True)
Source code in reactivity/hmr/core.py
34 35 36 |
|
NamespaceProxy
¶
Bases: Proxy
Source code in reactivity/hmr/core.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
module
instance-attribute
¶
module = module
__init__
¶
__init__(
initial: MutableMapping,
module: ReactiveModule,
check_equality=True,
*,
context: Context | None = None,
)
Source code in reactivity/hmr/core.py
40 41 42 |
|
_signal
¶
_signal(value=False)
Source code in reactivity/hmr/core.py
44 45 46 47 |
|
__getitem__
¶
__getitem__(key)
Source code in reactivity/hmr/core.py
49 50 51 52 53 54 55 56 57 |
|
ReactiveModule
¶
Bases: ModuleType
Source code in reactivity/hmr/core.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
instances
class-attribute
instance-attribute
¶
instances: WeakValueDictionary[Path, Self] = (
WeakValueDictionary()
)
__is_initialized
instance-attribute
¶
__is_initialized = True
__namespace
instance-attribute
¶
__namespace = namespace
__namespace_proxy
instance-attribute
¶
__namespace_proxy = NamespaceProxy(
namespace, self, context=HMR_CONTEXT
)
__hooks
instance-attribute
¶
__hooks: list[Callable[[], Any]] = []
__file
instance-attribute
¶
__file = file
file
property
¶
file
register_dispose_callback
property
¶
register_dispose_callback
load
property
¶
load
__init__
¶
__init__(
file: Path,
namespace: dict,
name: str,
doc: str | None = None,
)
Source code in reactivity/hmr/core.py
66 67 68 69 70 71 72 73 74 75 76 77 |
|
__load
¶
__load()
Source code in reactivity/hmr/core.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
__dir__
¶
__dir__()
Source code in reactivity/hmr/core.py
123 124 |
|
__getattribute__
¶
__getattribute__(name: str)
Source code in reactivity/hmr/core.py
126 127 128 129 130 131 |
|
__getattr__
¶
__getattr__(name: str)
Source code in reactivity/hmr/core.py
133 134 135 136 137 138 139 |
|
__setattr__
¶
__setattr__(name: str, value)
Source code in reactivity/hmr/core.py
141 142 143 144 |
|
ReactiveModuleLoader
¶
Bases: Loader
Source code in reactivity/hmr/core.py
147 148 149 150 151 152 153 154 155 156 157 158 |
|
create_module
¶
create_module(spec: ModuleSpec)
Source code in reactivity/hmr/core.py
148 149 150 151 152 153 154 |
|
exec_module
¶
exec_module(module: ModuleType)
Source code in reactivity/hmr/core.py
156 157 158 |
|
ReactiveModuleFinder
¶
Bases: MetaPathFinder
Source code in reactivity/hmr/core.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
|
includes
instance-attribute
¶
includes = _deduplicate(includes)
excludes
instance-attribute
¶
excludes = _deduplicate(
(
getenv("VIRTUAL_ENV"),
*(getsitepackages()),
getusersitepackages(),
*builtins,
*excludes,
)
)
_last_sys_path
instance-attribute
¶
_last_sys_path: list[str] = []
_last_cwd
instance-attribute
¶
_last_cwd: Path = Path()
_cached_search_paths
instance-attribute
¶
_cached_search_paths: list[Path] = []
search_paths
property
¶
search_paths
__init__
¶
__init__(
includes: Iterable[str] = ".",
excludes: Iterable[str] = (),
)
Source code in reactivity/hmr/core.py
173 174 175 176 177 178 179 180 181 182 183 |
|
_accept
¶
_accept(path: Path)
Source code in reactivity/hmr/core.py
185 186 |
|
find_spec
¶
find_spec(
fullname: str,
paths: Sequence[str | Path] | None,
_=None,
)
Source code in reactivity/hmr/core.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
|
ErrorFilter
¶
Source code in reactivity/hmr/core.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|
exclude_filenames
instance-attribute
¶
exclude_filenames = set(exclude_filenames)
__init__
¶
__init__(*exclude_filenames: str)
Source code in reactivity/hmr/core.py
243 244 |
|
__call__
¶
__call__(tb: TracebackType)
Source code in reactivity/hmr/core.py
246 247 248 249 250 251 252 253 254 255 256 257 |
|
__enter__
¶
__enter__()
Source code in reactivity/hmr/core.py
259 260 |
|
__exit__
¶
__exit__(
exc_type: type[BaseException],
exc_value: BaseException,
traceback: TracebackType,
)
Source code in reactivity/hmr/core.py
262 263 264 265 266 267 268 |
|
BaseReloader
¶
Source code in reactivity/hmr/core.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
|
entry
instance-attribute
¶
entry = entry_file
includes
instance-attribute
¶
includes = includes
excludes
instance-attribute
¶
excludes = excludes
error_filter
instance-attribute
¶
error_filter = ErrorFilter(
*(map(str, glob("**/*.py"))),
"<frozen importlib._bootstrap>",
)
entry_module
cached
property
¶
entry_module
_stop_event
cached
property
¶
_stop_event
__init__
¶
__init__(
entry_file: str,
includes: Iterable[str] = (".",),
excludes: Iterable[str] = (),
)
Source code in reactivity/hmr/core.py
272 273 274 275 276 277 |
|
run_entry_file
¶
run_entry_file()
Source code in reactivity/hmr/core.py
286 287 288 |
|
on_events
¶
on_events(events: Iterable[tuple[int, str]])
Source code in reactivity/hmr/core.py
290 291 292 293 294 295 296 |
|
on_changes
¶
on_changes(files: set[Path])
Source code in reactivity/hmr/core.py
298 299 300 301 302 303 304 305 306 307 308 309 310 |
|
stop_watching
¶
stop_watching()
Source code in reactivity/hmr/core.py
316 317 |
|
_SimpleEvent
¶
Source code in reactivity/hmr/core.py
320 321 322 323 324 325 326 327 328 |
|
SyncReloader
¶
Bases: BaseReloader
Source code in reactivity/hmr/core.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
|
start_watching
¶
start_watching()
Source code in reactivity/hmr/core.py
332 333 334 335 336 337 338 |
|
keep_watching_until_interrupt
¶
keep_watching_until_interrupt()
Source code in reactivity/hmr/core.py
340 341 342 343 344 |
|
AsyncReloader
¶
Bases: BaseReloader
Source code in reactivity/hmr/core.py
347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
|
start_watching
async
¶
start_watching()
Source code in reactivity/hmr/core.py
348 349 350 351 352 353 354 |
|
keep_watching_until_interrupt
async
¶
keep_watching_until_interrupt()
Source code in reactivity/hmr/core.py
356 357 358 359 360 |
|
is_called_internally
¶
is_called_internally(*, extra_depth=0) -> bool
Protect private methods from being called from outside this package.
Source code in reactivity/hmr/core.py
27 28 29 30 |
|
_deduplicate
¶
_deduplicate(input_paths: Iterable[str | Path | None])
Source code in reactivity/hmr/core.py
164 165 166 167 168 169 |
|
is_relative_to_any
¶
is_relative_to_any(path: Path, paths: Iterable[str | Path])
Source code in reactivity/hmr/core.py
222 223 |
|
patch_module
¶
patch_module(name_or_module: str | ModuleType)
Source code in reactivity/hmr/core.py
226 227 228 229 230 231 |
|
patch_meta_path
¶
patch_meta_path(
includes: Iterable[str] = (".",),
excludes: Iterable[str] = (),
)
Source code in reactivity/hmr/core.py
234 235 |
|
get_path_module_map
¶
get_path_module_map()
Source code in reactivity/hmr/core.py
238 239 |
|