MCPcopy Create free account
hub / github.com/pytorch/pytorch / run

Function run

scripts/release_notes/common.py:145–155  ·  view source on GitHub ↗

Returns (return-code, stdout, stderr)

(command)

Source from the content-addressed store, hash-verified

143
144
145def run(command):
146 """Returns (return-code, stdout, stderr)"""
147 p = subprocess.Popen(
148 command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
149 )
150 output, err = p.communicate()
151 rc = p.returncode
152 enc = locale.getpreferredencoding()
153 output = output.decode(enc)
154 err = err.decode(enc)
155 return rc, output.strip(), err.strip()
156
157
158def commit_body(commit_hash):

Callers 4

get_commits_betweenMethod · 0.90
commit_bodyFunction · 0.70
commit_titleFunction · 0.70
commit_files_changedFunction · 0.70

Calls 2

stripMethod · 0.80
decodeMethod · 0.45

Tested by

no test coverage detected