summaryrefslogtreecommitdiff
path: root/pylint/test/functional/control_pragmas.py
blob: 993f9a5dd6bb551143f4db5c93d0777ff54d010a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# pylint: disable=missing-docstring


def test_pragma():
    """Test that the control pragmas are not too eager to consume the entire line

    We should stop either at:
    - ; or #
    - or at the end of line
    """
    # noqa: E501 # pylint: disable=unused-variable #nosec
    variable = 1

    # noqa # pylint: disable=undefined-variable,no-member; don't trigger
    other_variable = some_variable + variable.member

    # noqa # pylint: disable=unbalanced-tuple-unpacking,no-member # no trigger
    first, second = some_other_variable
    return first + other_variable.method()