diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-08-22 16:03:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-22 16:03:28 +0200 |
commit | 8edce0174c576db69808fbe68150f75369d0550a (patch) | |
tree | fd00a03b9eff8024ebc62ef458e7cb7e59f63d54 /tests/functional/t | |
parent | e2816cd5c6f78b9fd399b35393e54eaa990b70ed (diff) | |
download | pylint-git-8edce0174c576db69808fbe68150f75369d0550a.tar.gz |
Don't emit ``trailing-whitespace`` twice for multi-line docstrings (#7335)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/functional/t')
-rw-r--r-- | tests/functional/t/trailing_whitespaces.py | 18 | ||||
-rw-r--r-- | tests/functional/t/trailing_whitespaces.txt | 8 |
2 files changed, 19 insertions, 7 deletions
diff --git a/tests/functional/t/trailing_whitespaces.py b/tests/functional/t/trailing_whitespaces.py index 8deaca78d..cb9d642ee 100644 --- a/tests/functional/t/trailing_whitespaces.py +++ b/tests/functional/t/trailing_whitespaces.py @@ -1,10 +1,20 @@ """Regression test for trailing-whitespace (C0303).""" -# pylint: disable=mixed-line-endings +# pylint: disable=mixed-line-endings,pointless-string-statement # +1: [trailing-whitespace] print('some trailing whitespace') # +1: [trailing-whitespace] print('trailing whitespace does not count towards the line length limit') -print('windows line ends are ok')
-# +1: [trailing-whitespace]
-print('but trailing whitespace on win is not')
+print('windows line ends are ok') +# +1: [trailing-whitespace] +print('but trailing whitespace on win is not') + +# Regression test for https://github.com/PyCQA/pylint/issues/6936 +# +2: [trailing-whitespace] +""" This module has the Board class. +""" + +# +3: [trailing-whitespace] +""" This module has the Board class. +It's a very nice Board. +""" diff --git a/tests/functional/t/trailing_whitespaces.txt b/tests/functional/t/trailing_whitespaces.txt index 45990737f..913e29a5a 100644 --- a/tests/functional/t/trailing_whitespaces.txt +++ b/tests/functional/t/trailing_whitespaces.txt @@ -1,3 +1,5 @@ -trailing-whitespace:5:33:None:None::Trailing whitespace:UNDEFINED -trailing-whitespace:7:73:None:None::Trailing whitespace:UNDEFINED -trailing-whitespace:10:46:None:None::Trailing whitespace:UNDEFINED +trailing-whitespace:5:33:None:None::Trailing whitespace:HIGH +trailing-whitespace:7:73:None:None::Trailing whitespace:HIGH +trailing-whitespace:10:46:None:None::Trailing whitespace:HIGH +trailing-whitespace:15:3:None:None::Trailing whitespace:HIGH +trailing-whitespace:20:3:None:None::Trailing whitespace:HIGH |