Method: pylint.message.message_id_store.MessageIdStore.get_active_msgids
Calls: 625706, Exceptions: 475591, Paths: 9Back
Path 1: 367008 calls (0.59)
'I0011' (1129) 'I0020' (1129) 'I0021' (1129) 'I0023' (1101) 'I1101' (1101) 'C0301' (1057) 'C0114' (1052) 'C0115' (1052) 'C0116' (1052) 'C0302' (1049) ...
['I0011'] (1129) ['I0020'] (1129) ['I0021'] (1129) ['I0023'] (1101) ['I1101'] (1101) ['C0301'] (1057) ['C0114'] (1052) ['C0115'] (1052) ['C0116'] (105...
KeyError (367008)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 2: 150115 calls (0.24)
'cell-var-from-loop' (10844) 'non-ascii-name' (8130) 'I0020' (7576) 'not-an-iterable' (7141) 'disallowed-name' (5052) 'redefined-outer-name' (4588) 't...
['W0640'] (10949) ['C2401'] (8260) ['I0020'] (7576) ['E1133'] (7237) ['C0104'] (5236) ['W0621'] (4747) ['R1702'] (4156) ['W1502'] (3852) ['I0011'] (34...
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 3: 107486 calls (0.17)
'protected-access' (1014) 'deprecated-method' (1012) 'deprecated-decorator' (1012) 'cyclic-import' (1012) 'unused-import' (1011) 'too-few-public-metho...
['W0212'] (1014) ['W4902'] (1012) ['W4905'] (1012) ['R0401'] (1012) ['W0611'] (1011) ['R0903'] (1010) ['W0621'] (1009) ['W0632'] (1009) ['W0644'] (100...
KeyError (107486)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 4: 1071 calls (0.0)
'dict-items-missing-iter' (1017) 'logging-fstring-formatting' (29) 'unbalanced_dict_unpacking' (6) 'a-removed-option' (4) 'magic-comparison' (4) 'logg...
UnknownMessageError (1071)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 5: 10 calls (0.0)
'W0113' (2) 'C05048' (1) 'R78948' (1) 'W04044' (1) 'T1234' (1) '12345' (1) 'C00000' (1) 'C1234' (1) 'W9876' (1)
UnknownMessageError (10)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 6: 6 calls (0.0)
'execfile-builtin' (1) 'deprecated-types-field' (1) 'dict-values-not-iterating' (1) 'no-space-after-operator' (1) 'buffer-builtin' (1) 'cmp-builtin' (...
DeletedMessageError (6)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 7: 4 calls (0.0)
'W1656' (1) 'W1634' (1) 'W1622' (1) 'C0323' (1)
DeletedMessageError (4)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 8: 3 calls (0.0)
'no-self-use' (3)
MessageBecameExtensionError (3)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids
Path 9: 3 calls (0.0)
'R0201' (3)
MessageBecameExtensionError (3)
1def get_active_msgids(self, msgid_or_symbol: str) -> list[str]:
2 """Return msgids but the input can be a symbol.
3
4 self.__active_msgids is used to implement a primitive cache for this function.
5 """
6 try:
7 return self.__active_msgids[msgid_or_symbol]
8 except KeyError:
9 pass
10
11 # If we don't have a cached value yet we compute it
12 msgid: str | None
13 deletion_reason = None
14 moved_reason = None
15 if msgid_or_symbol[1:].isdigit():
16 # Only msgid can have a digit as second letter
17 msgid = msgid_or_symbol.upper()
18 symbol = self.__msgid_to_symbol.get(msgid)
19 if not symbol:
20 deletion_reason = is_deleted_msgid(msgid)
21 if deletion_reason is None:
22 moved_reason = is_moved_msgid(msgid)
23 else:
24 symbol = msgid_or_symbol
25 msgid = self.__symbol_to_msgid.get(msgid_or_symbol)
26 if not msgid:
27 deletion_reason = is_deleted_symbol(symbol)
28 if deletion_reason is None:
29 moved_reason = is_moved_symbol(symbol)
30 if not msgid or not symbol:
31 if deletion_reason is not None:
32 raise DeletedMessageError(msgid_or_symbol, deletion_reason)
33 if moved_reason is not None:
34 raise MessageBecameExtensionError(msgid_or_symbol, moved_reason)
35 error_msg = f"No such message id or symbol '{msgid_or_symbol}'."
36 raise UnknownMessageError(error_msg)
37 ids = self.__old_names.get(msgid, [msgid])
38 # Add to cache
39 self.__active_msgids[msgid_or_symbol] = ids
40 return ids