Skip to content

EOLFixer#

Newversion Index / Newversion / EOLFixer

Auto-generated documentation for newversion.eol_fixer module.

EOLFixer#

Show source in eol_fixer.py:6

Converter between Unix and Windows line endings.

Signature#

class EOLFixer: ...

EOLFixer.add_newline#

Show source in eol_fixer.py:63

Add newline character to the end if it is missing.

Signature#

@classmethod
def add_newline(cls, text: str) -> str: ...

EOLFixer.get_line_ending#

Show source in eol_fixer.py:56

Get line ending character.

Signature#

@classmethod
def get_line_ending(cls, text: str) -> str: ...

EOLFixer.is_crlf#

Show source in eol_fixer.py:14

    Check whether text has `

` characters.

Arguments: text -- Text to check.

Signature#

@classmethod
def is_crlf(cls, text: str) -> bool: ...

EOLFixer.to_crlf#

Show source in eol_fixer.py:40

    Convert `

to `.

Arguments: text -- Text to convert.

Returns: Converted text.

Signature#

@classmethod
def to_crlf(cls, text: str) -> str: ...

EOLFixer.to_lf#

Show source in eol_fixer.py:24

    Convert `

to `.

Arguments: text -- Text to convert.

Returns: Converted text.

Signature#

@classmethod
def to_lf(cls, text: str) -> str: ...