MCPcopy Index your code
hub / github.com/requests/requests-oauthlib / replaceVariables

Method replaceVariables

tests/examples/base.py:29–35  ·  view source on GitHub ↗
(self, filein ,fileout, vars)

Source from the content-addressed store, hash-verified

27 self.proc.kill()
28
29 def replaceVariables(self, filein ,fileout, vars):
30 with open(filein, "rt") as fin:
31 with open(fileout, "wt") as fout:
32 for line in fin:
33 for k, v in vars.items():
34 line = line.replace(k, v)
35 fout.write(line)
36
37 def run_sample(self, filepath, variables):
38 inpath = os.path.join(cwd, "..", "..", "docs", "examples", filepath)

Callers 1

run_sampleMethod · 0.95

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected