def warn(self, msg):
        """Add a warning message.

        :param msg: The warning message to add.
        :type msg: str
        """
        self.warnings.append(
            self.state.document.reporter.warning(msg, line=self.lineno)
        )
def warn ( self , msg ) : self . warnings . append ( self . state . document . reporter . warning ( msg , line = self . lineno ) )
Add a warning message.

        :param msg: The warning message to add.
        :type msg: str