Method: pylint.utils.file_state.FileState.handle_ignored_message
Calls: 20010, Exceptions: 0, Paths: 2Back
Path 1: 12033 calls (0.6)
0 (12019) 2 (10) None (4)
'I0020' (7557) 'I0011' (3445) 'I0021' (945) 'C0411' (26) 'W0611' (21) 'C0114' (11) 'C0301' (8) 'R0903' (6) 'C0103' (3) 'W0603' (2)
1 (1828) 2 (1009) 3 (706) 4 (451) 0 (296) 5 (294) 6 (276) 7 (219) 9 (196) 8 (195)
1def handle_ignored_message(
2 self, state_scope: Literal[0, 1, 2] | None, msgid: str, line: int | None
3 ) -> None:
4 """Report an ignored message.
5
6 state_scope is either MSG_STATE_SCOPE_MODULE or MSG_STATE_SCOPE_CONFIG,
7 depending on whether the message was disabled locally in the module,
8 or globally.
9 """
10 if state_scope == MSG_STATE_SCOPE_MODULE:
11 assert isinstance(line, int) # should always be int inside module scope
12
13 try:
14 orig_line = self._suppression_mapping[(msgid, line)]
15 self._ignored_msgs[(msgid, orig_line)].add(line)
16 except KeyError:
17 pass
Path 2: 7977 calls (0.4)
1 (7977)
'C0116' (1188) 'C0103' (1033) 'R0903' (978) 'C0115' (918) 'W0613' (310) 'W0104' (301) 'C0114' (264) 'W0612' (239) 'W0611' (228) 'E0401' (185)
0 (287) 6 (198) 8 (183) 9 (174) 10 (165) 5 (159) 4 (153) 16 (145) 14 (145) 11 (138)
1def handle_ignored_message(
2 self, state_scope: Literal[0, 1, 2] | None, msgid: str, line: int | None
3 ) -> None:
4 """Report an ignored message.
5
6 state_scope is either MSG_STATE_SCOPE_MODULE or MSG_STATE_SCOPE_CONFIG,
7 depending on whether the message was disabled locally in the module,
8 or globally.
9 """
10 if state_scope == MSG_STATE_SCOPE_MODULE:
11 assert isinstance(line, int) # should always be int inside module scope
12
13 try:
14 orig_line = self._suppression_mapping[(msgid, line)]
15 self._ignored_msgs[(msgid, orig_line)].add(line)
16 except KeyError:
17 pass