-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a functional regression test. (#7451)
Refs #2964
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Regression test for `no-member`. | ||
See: https://github.com/PyCQA/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) |