Method: pylint.checkers.classes.class_checker.ClassChecker.visit_attribute
Calls: 3223, Exceptions: 0, Paths: 3Back
Path 1: 2849 calls (0.88)
Attribute (2849)
1def visit_attribute(self, node: nodes.Attribute) -> None:
2 """Check if the getattr is an access to a class member
3 if so, register it.
4
5 Also check for access to protected
6 class member from outside its class (but ignore __special__
7 methods)
8 """
9 self._check_super_without_brackets(node)
10
11 # Check self
12 if self._uses_mandatory_method_param(node):
13 self._accessed.set_accessed(node)
14 return
15 if not self.linter.is_message_enabled("protected-access"):
16 return
17
18 self._check_protected_attribute_access(node)
Path 2: 351 calls (0.11)
Attribute (351)
None (351)
1def visit_attribute(self, node: nodes.Attribute) -> None:
2 """Check if the getattr is an access to a class member
3 if so, register it.
4
5 Also check for access to protected
6 class member from outside its class (but ignore __special__
7 methods)
8 """
9 self._check_super_without_brackets(node)
10
11 # Check self
12 if self._uses_mandatory_method_param(node):
13 self._accessed.set_accessed(node)
14 return
15 if not self.linter.is_message_enabled("protected-access"):
16 return
17
18 self._check_protected_attribute_access(node)
Path 3: 23 calls (0.01)
Attribute (23)
None (23)
1def visit_attribute(self, node: nodes.Attribute) -> None:
2 """Check if the getattr is an access to a class member
3 if so, register it.
4
5 Also check for access to protected
6 class member from outside its class (but ignore __special__
7 methods)
8 """
9 self._check_super_without_brackets(node)
10
11 # Check self
12 if self._uses_mandatory_method_param(node):
13 self._accessed.set_accessed(node)
14 return
15 if not self.linter.is_message_enabled("protected-access"):
16 return
17
18 self._check_protected_attribute_access(node)