MCPcopy
hub / github.com/pallets/werkzeug / run_step

Method run_step

src/werkzeug/_reloader.py:380–401  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

378 sys.exit(3)
379
380 def run_step(self) -> None:
381 to_delete = set(self.watches)
382
383 for path in _find_watchdog_paths(self.extra_files, self.exclude_patterns):
384 if path not in self.watches:
385 try:
386 self.watches[path] = self.observer.schedule(
387 self.event_handler, path, recursive=True
388 )
389 except OSError:
390 # Clear this path from list of watches. We don't want
391 # the same error message showing again in the next
392 # iteration.
393 self.watches[path] = None
394
395 to_delete.discard(path)
396
397 for path in to_delete:
398 watch = self.watches.pop(path, None)
399
400 if watch is not None:
401 self.observer.unschedule(watch)
402
403
404reloader_loops: dict[str, type[ReloaderLoop]] = {

Callers 1

runMethod · 0.95

Calls 3

_find_watchdog_pathsFunction · 0.85
discardMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected