Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
Indexed
MCP
copy
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
16
def
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
22
ROOT_DIR = Path(__file__).resolve().parent
23
Callers
4
fix_encoding.py
File · 0.85
test_fixnewlines_end
Method · 0.85
fix_row
Function · 0.85
_fix_filename
Function · 0.85
Calls
3
open
Function · 0.50
read
Method · 0.45
write
Method · 0.45
Tested by
1
test_fixnewlines_end
Method · 0.68