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

Method _make_callback

21-async/mojifinder/bottle.py:527–541  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

525 yield p
526
527 def _make_callback(self):
528 callback = self.callback
529 for plugin in self.all_plugins():
530 try:
531 if hasattr(plugin, 'apply'):
532 api = getattr(plugin, 'api', 1)
533 context = self if api > 1 else self._context
534 callback = plugin.apply(callback, context)
535 else:
536 callback = plugin(callback)
537 except RouteReset: # Try again with changed configuration.
538 return self._make_callback()
539 if not callback is self.callback:
540 update_wrapper(callback, self.callback)
541 return callback
542
543 def get_undecorated_callback(self):
544 ''' Return the callback. If the callback is a decorated function, try to

Callers 1

callMethod · 0.95

Calls 3

all_pluginsMethod · 0.95
update_wrapperFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected