(self, shell=None)
| 178 | """Autoreload all modules AND autoload all new objects""" |
| 179 | |
| 180 | def __init__(self, shell=None): |
| 181 | # Modules that failed to reload: {module: mtime-on-failed-reload, ...} |
| 182 | self.failed = {} |
| 183 | # Modules specially marked as autoreloadable. |
| 184 | self.modules = {} |
| 185 | # Modules specially marked as not autoreloadable. |
| 186 | self.skip_modules = {} |
| 187 | # (module-name, name) -> weakref, for replacing old code objects |
| 188 | self.old_objects = {} |
| 189 | # Module modification timestamps |
| 190 | self.modules_mtimes = {} |
| 191 | self.shell = shell |
| 192 | |
| 193 | # Reporting callable for verbosity |
| 194 | self._report = lambda msg: None # by default, be quiet. |
| 195 | |
| 196 | # Deduper reloader |
| 197 | self.deduper_reloader = DeduperReloader() |
| 198 | |
| 199 | # Persistent import tracker for from-imports |
| 200 | self.import_from_tracker = ImportFromTracker({}, {}) |
| 201 | |
| 202 | # Cache module modification times |
| 203 | self.check(check_all=True, do_reload=False) |
| 204 | |
| 205 | # To hide autoreload errors |
| 206 | self.hide_errors = False |
| 207 | |
| 208 | def mark_module_skipped(self, module_name): |
| 209 | """Skip reloading the named module in the future""" |
nothing calls this directly
no test coverage detected