MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / main

Function main

tools/update_license_headers.py:47–59  ·  view source on GitHub ↗
(input_file="NOTICE.yml")

Source from the content-addressed store, hash-verified

45
46
47def main(input_file="NOTICE.yml"):
48 config = load_config(input_file)
49 for entry in config:
50 filelist = list(walk_directory(entry))
51 with tempfile.NamedTemporaryFile(mode="w") as header_file:
52 header_file.write(entry["header"])
53 header_file.flush()
54 header_file.seek(0)
55 command = ["licenseheaders", "-t", str(header_file.name), "-f"] + filelist
56 result = subprocess.run(command, capture_output=True)
57 if result.returncode != 0:
58 print(result.stdout.decode())
59 print(result.stderr.decode())
60
61
62if __name__ == "__main__":

Callers 1

Calls 6

walk_directoryFunction · 0.85
writeMethod · 0.80
flushMethod · 0.80
decodeMethod · 0.80
load_configFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected