MCPcopy
hub / github.com/csev/py4e / _guess_eol

Method _guess_eol

lectures/srt-split/pysrt/srtfile.py:257–262  ·  view source on GitHub ↗
(cls, string_iterable)

Source from the content-addressed store, hash-verified

255
256 @classmethod
257 def _guess_eol(cls, string_iterable):
258 first_line = cls._get_first_line(string_iterable)
259 for eol in ('\r\n', '\r', '\n'):
260 if first_line.endswith(eol):
261 return eol
262 return os.linesep
263
264 @classmethod
265 def _get_first_line(cls, string_iterable):

Callers 1

readMethod · 0.95

Calls 1

_get_first_lineMethod · 0.80

Tested by

no test coverage detected