pylint/message/message_store.py
def _check_symbol(self, msgid, symbol):
        """Check that a symbol is not already used. """
        other_message = self._messages_definitions.get(symbol)
        if other_message:
            self._raise_duplicate_msg_id(symbol, msgid, other_message.msgid)
        else:
            alternative_msgid = None
        alternative_message = self._alternative_names.get(symbol)
        if alternative_message:
            if alternative_message.symbol == symbol:
                alternative_msgid = alternative_message.msgid
            else:
                for old_msgid, old_symbol in alternative_message.old_names:
                    if old_symbol == symbol:
                        alternative_msgid = old_msgid
                        break
            if msgid != alternative_msgid:
                self._raise_duplicate_msg_id(symbol, msgid, alternative_msgid)
def _check_symbol(self, msgid, symbol):
        other_message = self._messages_definitions.get(symbol)
        if other_message:
            self._raise_duplicate_msg_id(symbol, msgid, other_message.msgid)
        else:
            alternative_msgid = None
        alternative_message = self._alternative_names.get(symbol)
        if alternative_message:
            if alternative_message.symbol == symbol:
                alternative_msgid = alternative_message.msgid
            else:
                for old_msgid, old_symbol in alternative_message.old_names:
                    if old_symbol == symbol:
                        alternative_msgid = old_msgid
                        break
            if msgid != alternative_msgid:
                self._raise_duplicate_msg_id(symbol, msgid, alternative_msgid)
def _check_symbol ( self , msgid , symbol ) : other_message = self . _messages_definitions . get ( symbol ) if other_message : self . _raise_duplicate_msg_id ( symbol , msgid , other_message . msgid ) else : alternative_msgid = None alternative_message = self . _alternative_names . get ( symbol ) if alternative_message : if alternative_message . symbol == symbol : alternative_msgid = alternative_message . msgid else : for old_msgid , old_symbol in alternative_message . old_names : if old_symbol == symbol : alternative_msgid = old_msgid break if msgid != alternative_msgid : self . _raise_duplicate_msg_id ( symbol , msgid , alternative_msgid )
Check that a symbol is not already used.
Check that a symbol is not already used .