MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / main

Function main

tools/check_code_block_format.py:249–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247
248
249def main():
250 args = cli()
251 files = args.files
252 diagnostics: list[tuple[Path, list[Diagnostic]]] = []
253 for file in expand_glob(files):
254 with open(file, 'r') as f:
255 file_diagnostics = check_code_block_format(f)
256 for diagnostic in file_diagnostics:
257 diagnostics.append((file, file_diagnostics))
258 if diagnostics:
259 for file, file_diagnostics in diagnostics:
260 for diagnostic in file_diagnostics:
261 show_diagnostic(file, diagnostic)
262 sys.exit(1)
263
264
265if __name__ == "__main__":

Callers 1

Calls 6

check_code_block_formatFunction · 0.85
show_diagnosticFunction · 0.85
exitMethod · 0.80
cliFunction · 0.70
expand_globFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected