MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / create_ordered_callbacks_list

Method create_ordered_callbacks_list

modules/scripts.py:806–817  ·  view source on GitHub ↗
(self,  method_name, *, enable_user_sort=True)

Source from the content-addressed store, hash-verified

804 def create_ordered_callbacks_list(self, method_name, *, enable_user_sort=True):
805 script_list = self.list_scripts_for_method(method_name)
806 category = f'script_{method_name}'
807 callbacks = []
808
809 for script in script_list:
810 if getattr(script.__class__, method_name, None) == getattr(Script, method_name, None):
811 continue
812
813 script_callbacks.add_callback(callbacks, script, category=category, name=script.__class__.__name__, filename=script.filename)
814
815 return script_callbacks.sort_callbacks(category, callbacks, enable_user_sort=enable_user_sort)
816
817 def ordered_callbacks(self, method_name, *, enable_user_sort=True):
818 script_list = self.list_scripts_for_method(method_name)
819 category = f'script_{method_name}'
820

Callers 2

ordered_callbacksMethod · 0.95
callbacks_order_settingsFunction · 0.80

Calls 1

Tested by

no test coverage detected