MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / reset

Method reset

21-async/mojifinder/bottle.py:741–751  ·  view source on GitHub ↗

Reset all routes (force plugins to be re-applied) and clear all caches. If an ID or route object is given, only that specific route is affected.

(self, route=None)

Source from the content-addressed store, hash-verified

739 return removed
740
741 def reset(self, route=None):
742 ''' Reset all routes (force plugins to be re-applied) and clear all
743 caches. If an ID or route object is given, only that specific route
744 is affected. '''
745 if route is None: routes = self.routes
746 elif isinstance(route, Route): routes = [route]
747 else: routes = [self.routes[route]]
748 for route in routes: route.reset()
749 if DEBUG:
750 for route in routes: route.prepare()
751 self.trigger_hook('app_reset')
752
753 def close(self):
754 ''' Close the application and all installed plugins. '''

Callers 2

installMethod · 0.95
uninstallMethod · 0.95

Calls 3

trigger_hookMethod · 0.95
resetMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected