MCPcopy
hub / github.com/PaddlePaddle/PaddleFormers / process_file

Function process_file

scripts/codestyle/check_spaces.py:51–59  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

49
50
51def process_file(file_path):
52 with open(file_path, "r+", encoding="utf-8") as file:
53 content = file.read()
54 new_content = process_outside_codeblocks(content)
55 if new_content != content:
56 file.seek(0)
57 file.write(new_content)
58 file.truncate()
59 print(f"Spaces added to {file_path} (excluding code blocks)")
60
61
62if __name__ == "__main__":

Callers 1

check_spaces.pyFile · 0.70

Calls 3

readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected