.. _unexpected-line-ending-format:

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:**

.. literalinclude:: /data/messages/u/unexpected-line-ending-format/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/u/unexpected-line-ending-format/good.py
   :language: python

**Configuration file:**

.. literalinclude:: /data/messages/u/unexpected-line-ending-format/pylintrc
    :language: ini


**Related links:**

- `History of CRLF and LF <https://stackoverflow.com/a/6521730/2519059>`_
- `Dealing with line endings in Git <https://stackoverflow.com/a/10855862/2519059>`_
- `A Collection of Useful .gitattributes Templates <https://github.com/alexkaratarakis/gitattributes>`_


Created by the `format <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/format.py>`__ checker.