MCPcopy Index your code
hub / github.com/bugy/script-server / ScriptValuesProvider

Class ScriptValuesProvider

src/config/script/list_values.py:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43class ScriptValuesProvider(ValuesProvider):
44
45 def __init__(self, script, shell, process_invoker: ProcessInvoker) -> None:
46 script_output = process_invoker.invoke(script, shell=shell)
47 script_output = script_output.rstrip('\n')
48 self._values = [line for line in script_output.split('\n') if not is_empty(line)]
49
50 def get_values(self, parameter_values):
51 return self._values
52
53
54class DependantScriptValuesProvider(ValuesProvider):

Calls

no outgoing calls

Tested by 3

test_ls_3_filesMethod · 0.72
test_ls_no_filesMethod · 0.72