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

Function _normalize_line_endings

tools/python-3.11.9-amd64/Lib/zipimport.py:686–689  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

684# Replace any occurrences of '\r\n?' in the input string with '\n'.
685# This converts DOS and Mac line endings to Unix line endings.
686def _normalize_line_endings(source):
687 source = source.replace(b'\r\n', b'\n')
688 source = source.replace(b'\r', b'\n')
689 return source
690
691# Given a string buffer containing Python source code, compile it
692# and return a code object.

Callers 1

_compile_sourceFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected