MCPcopy Index your code
hub / github.com/python/cpython / fix

Function fix

PCbuild/fix_encoding.py:16–20  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

14__version__ = "1.0.0.0"
15
16def fix(p):
17 with open(p, 'r', encoding='utf-8-sig') as f:
18 data = f.read()
19 with open(p, 'w', encoding='utf-8-sig') as f:
20 f.write(data)
21
22ROOT_DIR = Path(__file__).resolve().parent
23

Callers 4

fix_encoding.pyFile · 0.85
test_fixnewlines_endMethod · 0.85
fix_rowFunction · 0.85
_fix_filenameFunction · 0.85

Calls 3

openFunction · 0.50
readMethod · 0.45
writeMethod · 0.45

Tested by 1

test_fixnewlines_endMethod · 0.68