Method: pylint.checkers.variables.VariablesChecker._is_name_ignored
Calls: 1512, Exceptions: 0, Paths: 4Back
Path 1: 991 calls (0.66)
AssignName (991)
'self' (598) 'cls' (52) 'arg' (24) 'arg1' (22) 'arg2' (15) '_' (14) 'x' (12) 'y' (12) 'name' (10) 'doc_type' (10)
None (960) Match (31)
1def _is_name_ignored(
2 self, stmt: nodes.NodeNG, name: str
3 ) -> re.Pattern[str] | re.Match[str] | None:
4 authorized_rgx = self.linter.config.dummy_variables_rgx
5 if (
6 isinstance(stmt, nodes.AssignName)
7 and isinstance(stmt.parent, nodes.Arguments)
8 or isinstance(stmt, nodes.Arguments)
9 ):
10 regex: re.Pattern[str] = self.linter.config.ignored_argument_names
11 else:
12 regex = authorized_rgx
13 # See https://stackoverflow.com/a/47007761/2519059 to
14 # understand what this function return. Please do NOT use
15 # this elsewhere, this is confusing for no benefit
16 return regex and regex.match(name)
Path 2: 414 calls (0.27)
AssignName (414)
'_' (75) 'a' (42) 'c' (29) 'b' (26) 'i' (17) 'var' (12) 'd' (12) 'e' (12) 'variable' (10) 'x' (8)
None (331) Match (83)
1def _is_name_ignored(
2 self, stmt: nodes.NodeNG, name: str
3 ) -> re.Pattern[str] | re.Match[str] | None:
4 authorized_rgx = self.linter.config.dummy_variables_rgx
5 if (
6 isinstance(stmt, nodes.AssignName)
7 and isinstance(stmt.parent, nodes.Arguments)
8 or isinstance(stmt, nodes.Arguments)
9 ):
10 regex: re.Pattern[str] = self.linter.config.ignored_argument_names
11 else:
12 regex = authorized_rgx
13 # See https://stackoverflow.com/a/47007761/2519059 to
14 # understand what this function return. Please do NOT use
15 # this elsewhere, this is confusing for no benefit
16 return regex and regex.match(name)
Path 3: 69 calls (0.05)
FunctionDef (26) Import (24) ImportFrom (15) ClassDef (3) AsyncFunctionDef (1)
'_inner' (5) 'inner_func' (3) 'sys' (3) 'namedtuple' (2) 'stuff' (2) 'open' (2) 'OS' (2) 'collections' (2) 'PATH' (2) 'deque' (2)
None (59) Match (10)
1def _is_name_ignored(
2 self, stmt: nodes.NodeNG, name: str
3 ) -> re.Pattern[str] | re.Match[str] | None:
4 authorized_rgx = self.linter.config.dummy_variables_rgx
5 if (
6 isinstance(stmt, nodes.AssignName)
7 and isinstance(stmt.parent, nodes.Arguments)
8 or isinstance(stmt, nodes.Arguments)
9 ):
10 regex: re.Pattern[str] = self.linter.config.ignored_argument_names
11 else:
12 regex = authorized_rgx
13 # See https://stackoverflow.com/a/47007761/2519059 to
14 # understand what this function return. Please do NOT use
15 # this elsewhere, this is confusing for no benefit
16 return regex and regex.match(name)
Path 4: 38 calls (0.03)
Arguments (38)
'kwargs' (19) 'args' (13) '_args' (2) '_kwargs' (2) '_' (1) 'params' (1)
None (31) Match (7)
1def _is_name_ignored(
2 self, stmt: nodes.NodeNG, name: str
3 ) -> re.Pattern[str] | re.Match[str] | None:
4 authorized_rgx = self.linter.config.dummy_variables_rgx
5 if (
6 isinstance(stmt, nodes.AssignName)
7 and isinstance(stmt.parent, nodes.Arguments)
8 or isinstance(stmt, nodes.Arguments)
9 ):
10 regex: re.Pattern[str] = self.linter.config.ignored_argument_names
11 else:
12 regex = authorized_rgx
13 # See https://stackoverflow.com/a/47007761/2519059 to
14 # understand what this function return. Please do NOT use
15 # this elsewhere, this is confusing for no benefit
16 return regex and regex.match(name)