-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Bug 🪲False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code
Description
Bug description
# pylint: disable=wrong-import-position
"""Test."""
import time
satrt = time.time()
import os
_ = osConfiguration
No response
Command used
pylint a.py --enable=useless-suppressionPylint output
This message is issued:
$ pylint a.py --enable=useless-suppression
************* Module a
a.py:1:0: I0021: Useless suppression of 'wrong-import-position' (useless-suppression)
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)However, if the comment is removed from line 1, this message is issued:
$ pylint a.py --enable=useless-suppression
************* Module a
a.py:6:0: C0413: Import "import os" should be placed at the top of the module (wrong-import-position)
-------------------------------------------------------------------
Your code has been rated at 7.50/10 (previous run: 10.00/10, -2.50)Expected behavior
expect get no useless-suppression message
Pylint version
pylint 2.11.1
astroid 2.8.4
Python 3.7.9 (default, Aug 31 2020, 07:22:35)
[Clang 10.0.0 ]OS / Environment
macOS
Additional dependencies
No response
Metadata
Metadata
Assignees
Labels
Bug 🪲False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the code