Method: pylint.checkers.variables.VariablesChecker._check_metaclasses
Calls: 4662, Exceptions: 0, Paths: 4Back
Path 1: 4029 calls (0.86)
FunctionDef (3428) Module (547) AsyncFunctionDef (54)
1def _check_metaclasses(self, node: nodes.Module | nodes.FunctionDef) -> None:
2 """Update consumption analysis for metaclasses."""
3 consumed: list[tuple[dict[str, list[nodes.NodeNG]], str]] = []
4
5 for child_node in node.get_children():
6 if isinstance(child_node, nodes.ClassDef):
7 consumed.extend(self._check_classdef_metaclasses(child_node, node))
8
9 # Pop the consumed items, in order to avoid having
10 # unused-import and unused-variable false positives
11 for scope_locals, name in consumed:
12 scope_locals.pop(name, None)
Path 2: 411 calls (0.09)
Module (371) FunctionDef (40)
1def _check_metaclasses(self, node: nodes.Module | nodes.FunctionDef) -> None:
2 """Update consumption analysis for metaclasses."""
3 consumed: list[tuple[dict[str, list[nodes.NodeNG]], str]] = []
4
5 for child_node in node.get_children():
6 if isinstance(child_node, nodes.ClassDef):
7 consumed.extend(self._check_classdef_metaclasses(child_node, node))
8
9 # Pop the consumed items, in order to avoid having
10 # unused-import and unused-variable false positives
11 for scope_locals, name in consumed:
12 scope_locals.pop(name, None)
Path 3: 187 calls (0.04)
Module (187)
1def _check_metaclasses(self, node: nodes.Module | nodes.FunctionDef) -> None:
2 """Update consumption analysis for metaclasses."""
3 consumed: list[tuple[dict[str, list[nodes.NodeNG]], str]] = []
4
5 for child_node in node.get_children():
6 if isinstance(child_node, nodes.ClassDef):
7 consumed.extend(self._check_classdef_metaclasses(child_node, node))
8
9 # Pop the consumed items, in order to avoid having
10 # unused-import and unused-variable false positives
11 for scope_locals, name in consumed:
12 scope_locals.pop(name, None)
Path 4: 35 calls (0.01)
Module (30) FunctionDef (5)
1def _check_metaclasses(self, node: nodes.Module | nodes.FunctionDef) -> None:
2 """Update consumption analysis for metaclasses."""
3 consumed: list[tuple[dict[str, list[nodes.NodeNG]], str]] = []
4
5 for child_node in node.get_children():
6 if isinstance(child_node, nodes.ClassDef):
7 consumed.extend(self._check_classdef_metaclasses(child_node, node))
8
9 # Pop the consumed items, in order to avoid having
10 # unused-import and unused-variable false positives
11 for scope_locals, name in consumed:
12 scope_locals.pop(name, None)