summaryrefslogtreecommitdiff
path: root/tests/functional/n/no/no_member_augassign.py
blob: 8954861e37be52123221f291ced0b7499d832091 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Tests for no-member in relation to AugAssign operations."""
# pylint: disable=missing-module-docstring, too-few-public-methods, missing-class-docstring, invalid-name

# Test for: https://github.com/pylint-dev/pylint/issues/4562
class A:
    value: int

obj_a = A()
obj_a.value += 1  # [no-member]


class B:
    value: int

obj_b = B()
obj_b.value = 1 + obj_b.value  # [no-member]


class C:
    value: int


obj_c = C()
obj_c.value += 1  # [no-member]
obj_c.value = 1 + obj_c.value  # [no-member]