MCPcopy Index your code
hub / github.com/RustPython/RustPython / _normalize_line_endings

Function _normalize_line_endings

Lib/zipimport.py:730–733  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

728# Replace any occurrences of '\r\n?' in the input string with '\n'.
729# This converts DOS and Mac line endings to Unix line endings.
730def _normalize_line_endings(source):
731 source = source.replace(b'\r\n', b'\n')
732 source = source.replace(b'\r', b'\n')
733 return source
734
735# Given a string buffer containing Python source code, compile it
736# and return a code object.

Callers 1

_compile_sourceFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected