unexpected-line-ending-format / C0328ΒΆ

Message emitted:

Unexpected line ending format. There is '%s' while it should be '%s'.

Description:

Used when there is different newline than expected.

Problematic code:

print("I'm drinking tea!")  # CRLF (\r\n) # [unexpected-line-ending-format]
print("I'm drinking water!")  # CRLF (\r\n) # [unexpected-line-ending-format]

Correct code:

print("I'm drinking tea!")  # LF (\n)
print("I'm drinking water!")  # LF (\n)

Configuration file:

[FORMAT]
expected-line-ending-format=LF

Related links:

Created by the format checker.