summaryrefslogtreecommitdiff
path: root/tests/functional/r/regression_02/regression_2964.py
blob: ad843309169eb65aeb04b5ea1db9c0a40f5c2a63 (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
"""
Regression test for `no-member`.
See: https://github.com/pylint-dev/pylint/issues/2964
"""

# pylint: disable=missing-class-docstring,too-few-public-methods
# pylint: disable=unused-private-member,protected-access


class Node:
    def __init__(self, name, path=()):
        """
        Initialize self with "name" string and the tuple "path" of its parents.
        "self" is added to the tuple as its last item.
        """
        self.__name = name
        self.__path = path + (self,)

    def get_full_name(self):
        """
        A `no-member` message was emitted:
        nodes.py:17:24: E1101: Instance of 'tuple' has no '__name' member (no-member)
        """
        return ".".join(node.__name for node in self.__path)