MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / copyright_scan

Function copyright_scan

scripts/copyright-scan.py:153–164  ·  view source on GitHub ↗

Update copyright for TensorRT sources

(directory, depth, args, exclude_dirs=[])

Source from the content-addressed store, hash-verified

151 f.write(new_data)
152
153def copyright_scan(directory, depth, args, exclude_dirs=[]):
154 """
155 Update copyright for TensorRT sources
156 """
157 if directory in exclude_dirs:
158 return
159 for f in os.listdir(directory):
160 filename = os.path.join(directory,f)
161 if os.path.isdir(filename) and (depth > 0):
162 copyright_scan(filename, depth-1, args, exclude_dirs)
163 elif filename.endswith(extensions_p + extensions_c):
164 update(filename, args)
165
166def main():
167 parser = argparse.ArgumentParser(description='TensorRT copyright scan')

Callers 1

mainFunction · 0.85

Calls 1

updateFunction · 0.85

Tested by

no test coverage detected