MCPcopy Create free account
hub / github.com/apache/arrow / __call__

Method __call__

dev/archery/archery/utils/command.py:38–49  ·  view source on GitHub ↗
(self, f)

Source from the content-addressed store, hash-verified

36 self.listify = listify
37
38 def __call__(self, f):
39 def strip_it(x):
40 return x.strip() if self.strip else x
41
42 def list_it(x):
43 return x.decode('utf-8').splitlines() if self.listify else x
44
45 def wrapper(*argv, **kwargs):
46 # Ensure stdout is captured
47 kwargs["stdout"] = subprocess.PIPE
48 return list_it(strip_it(f(*argv, **kwargs).stdout))
49 return wrapper
50
51
52class Command:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected