MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / complete_file

Function complete_file

tools/python-3.11.9-amd64/Tools/scripts/pindent.py:390–401  ·  view source on GitHub ↗
(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS)

Source from the content-addressed store, hash-verified

388# end def make_backup
389
390def complete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS):
391 with open(filename, 'r') as f:
392 source = f.read()
393 # end with
394 result = complete_string(source, stepsize, tabsize, expandtabs)
395 if source == result: return 0
396 # end if
397 make_backup(filename)
398 with open(filename, 'w') as f:
399 f.write(result)
400 # end with
401 return 1
402# end def complete_file
403
404def delete_file(filename, stepsize = STEPSIZE, tabsize = TABSIZE, expandtabs = EXPANDTABS):

Callers

nothing calls this directly

Calls 5

complete_stringFunction · 0.85
make_backupFunction · 0.85
openFunction · 0.50
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected