MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / wrapper

Function wrapper

common/wrapper.py:14–26  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

12 def decorator(func):
13 @wraps(func)
14 def wrapper(*args, **kwargs):
15
16 try:
17 self = args[0]
18 nums = self.sc_number
19 except:
20 nums = n
21
22 with ThreadPoolExecutor() as executor:
23 futures = [executor.submit(func, *args, **kwargs) for _ in range(nums)]
24 outputs = [future.result() for future in futures]
25 output, statistics = combine_json(outputs, keys, mode)
26 return output, statistics
27
28 return wrapper
29

Callers

nothing calls this directly

Calls 1

combine_jsonFunction · 0.85

Tested by

no test coverage detected