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

Function _normalize_line_endings

Lib/zipimport.py:738–741  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

736# Replace any occurrences of '\r\n?' in the input string with '\n'.
737# This converts DOS and Mac line endings to Unix line endings.
738def _normalize_line_endings(source):
739 source = source.replace(b'\r\n', b'\n')
740 source = source.replace(b'\r', b'\n')
741 return source
742
743# Given a string buffer containing Python source code, compile it
744# and return a code object.

Callers 1

_compile_sourceFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…