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

Function check_code_block_format

tools/check_code_block_format.py:234–239  ·  view source on GitHub ↗
(file: io.TextIOWrapper)

Source from the content-addressed store, hash-verified

232
233
234def check_code_block_format(file: io.TextIOWrapper) -> list[Diagnostic]:
235 diagnostics: list[Diagnostic] = []
236 for code_block in extract_code_blocks(file):
237 diagnostics.extend(check_code_block_indentation(code_block))
238 diagnostics.extend(check_code_block_follows_blank_line(code_block))
239 return diagnostics
240
241
242def show_diagnostic(file: Path, diagnostic: Diagnostic) -> None:

Callers 1

mainFunction · 0.85

Calls 4

extract_code_blocksFunction · 0.85
extendMethod · 0.45

Tested by

no test coverage detected