module documentation

Undocumented

Class ​Reloader​Loop No class docstring; 0/3 instance variable, 0/1 class variable, 5/8 methods documented
Class ​Stat​Reloader​Loop Undocumented
Class ​Watchdog​Reloader​Loop Undocumented
Function ensure​_echo​_on Ensure that echo mode is enabled. Some tools such as PDB disable it which causes usability issues after a reload.
Function run​_with​_reloader Run the given function in an independent Python interpreter.
Variable prefix Undocumented
Variable reloader​_loops Undocumented
Function ​_find​_common​_roots Undocumented
Function ​_find​_stat​_paths Find paths for the stat reloader to watch. Returns imported module files, Python files under non-system paths. Extra files and Python files under extra directories can also be scanned.
Function ​_find​_watchdog​_paths Find paths for the stat reloader to watch. Looks at the same sources as the stat reloader, but watches everything under directories instead of individual files.
Function ​_get​_args​_for​_reloading Determine how the script was executed, and return the args needed to execute it again in a new process.
Function ​_iter​_module​_paths Find the filesystem paths associated with imported modules.
Function ​_remove​_by​_pattern Undocumented
Variable ​_ignore​_prefixes Undocumented
def ensure_echo_on():
Ensure that echo mode is enabled. Some tools such as PDB disable it which causes usability issues after a reload.
def run_with_reloader(main_func, extra_files=None, exclude_patterns=None, interval=1, reloader_type='auto'):
Run the given function in an independent Python interpreter.
Parameters
main​_func:t.Callable[[], None]Undocumented
extra​_files:t.Optional[t.Iterable[str]]Undocumented
exclude​_patterns:t.Optional[t.Iterable[str]]Undocumented
interval:t.Union[int, float]Undocumented
reloader​_type:strUndocumented
prefix =

Undocumented

reloader_loops: t.Dict[str, t.Type[ReloaderLoop]] =

Undocumented

def _find_common_roots(paths):

Undocumented

Parameters
paths:t.Iterable[str]Undocumented
Returns
t.Iterable[str]Undocumented
def _find_stat_paths(extra_files, exclude_patterns):

Find paths for the stat reloader to watch. Returns imported module files, Python files under non-system paths. Extra files and Python files under extra directories can also be scanned.

System paths have to be excluded for efficiency. Non-system paths, such as a project root or sys.path.insert, should be the paths of interest to the user anyway.

Parameters
extra​_files:t.Set[str]Undocumented
exclude​_patterns:t.Set[str]Undocumented
Returns
t.Iterable[str]Undocumented
def _find_watchdog_paths(extra_files, exclude_patterns):
Find paths for the stat reloader to watch. Looks at the same sources as the stat reloader, but watches everything under directories instead of individual files.
Parameters
extra​_files:t.Set[str]Undocumented
exclude​_patterns:t.Set[str]Undocumented
Returns
t.Iterable[str]Undocumented
def _get_args_for_reloading():
Determine how the script was executed, and return the args needed to execute it again in a new process.
Returns
t.List[str]Undocumented
def _iter_module_paths():
Find the filesystem paths associated with imported modules.
Returns
t.Iterator[str]Undocumented
def _remove_by_pattern(paths, exclude_patterns):

Undocumented

Parameters
paths:t.Set[str]Undocumented
exclude​_patterns:t.Set[str]Undocumented
_ignore_prefixes =

Undocumented