class documentation
class MessageDefinitionStore: (source)
The messages store knows information about every possible message definition but has no particular state during analysis.
Method | __init__ |
Undocumented |
Method | find |
Finds all emittable and non-emittable messages. |
Method | get |
Returns the Message definition for either a numeric or symbolic id. |
Method | get |
Generates a user-consumable representation of a message. |
Method | help |
Display help messages for the given message identifiers. |
Method | list |
Output full messages list documentation in ReST format. |
Method | register |
Register a MessageDefinition with consistency in mind. |
Method | register |
Register all messages definitions from a checker. |
Instance Variable | message |
Undocumented |
Instance Variable | py |
Undocumented |
Property | messages |
The list of all active messages. |
Instance Variable | _messages |
Undocumented |
Instance Variable | _msgs |
Undocumented |
def find_emittable_messages(self) ->
tuple[ list[ MessageDefinition], list[ MessageDefinition]]
:
(source)
¶
Finds all emittable and non-emittable messages.
@functools.lru_cache( maxsize=None)
def get_message_definitions(self, msgid_or_symbol:
def get_message_definitions(self, msgid_or_symbol:
str
) -> list[ MessageDefinition]
:
(source)
¶
Returns the Message definition for either a numeric or symbolic id. The cache has no limit as its size will likely stay minimal. For each message we store about 1000 characters, so even if we would have 1000 messages the cache would only take up ~= 1 Mb.