diff options
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | ChangeLog | 2 | ||||
| -rw-r--r-- | pylint/checkers/format.py | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d714c90be..856f112a4 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -164,3 +164,5 @@ Order doesn't matter (not that much, at least ;) * Jason Owen: contributor * Mitchell Young: minor adjustment to docparams + +* Michael Hudson-Doyle
\ No newline at end of file @@ -11,6 +11,8 @@ Release date: |TBA| Close #2047 + * Fix compatibility with changes to stdlib tokenizer. + What's New in Pylint 1.9.4? =========================== diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py index b16a91a8a..f144e1380 100644 --- a/pylint/checkers/format.py +++ b/pylint/checkers/format.py @@ -871,8 +871,11 @@ class FormatChecker(BaseTokenChecker): def _check_line_ending(self, line_ending, line_num): # check if line endings are mixed if self._last_line_ending is not None: - if line_ending != self._last_line_ending: - self.add_message('mixed-line-endings', line=line_num) + # line_ending == "" indicates a synthetic newline added at + # the end of a file that does not, in fact, end with a + # newline. + if line_ending and line_ending != self._last_line_ending: + self.add_message("mixed-line-endings", line=line_num) self._last_line_ending = line_ending |
