Open
Description
Bug description
A false negative with the trailing-comma-tuple
rule can occur due to code preceding the use of a comma.
"""detected.py"""
# pylint: disable=expression-not-assigned
print("demo"),
"""undetected.py"""
# pylint: disable=expression-not-assigned
DEMO = True
print("demo"),
Configuration
No response
Command used
pylint detected.py undetected.py
Pylint output
************* Module detected
detected.py:4:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
Expected behavior
************* Module detected
detected.py:4:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
************* Module undetected
undetected.py:6:0: R1707: Disallow trailing comma tuple (trailing-comma-tuple)
Pylint version
pylint 2.16.1
astroid 2.14.1
Python 3.11.1 (main, Jan 28 2023, 18:47:50) [GCC 11.3.0]
OS / Environment
Ubuntu 22.04.1
Additional dependencies
No response