sugarsdk/linting/pep287.py
def _check_raises_described(self, node, raised):
        """
        Check if 'raises' is properly documented.

        :param doc:
        :return:
        """
        for line in node.doc.strip().split(os.linesep):
            line = line.strip()
            if line.startswith(":raises "):
                exc_name = line.split(" ", 1)[-1].split(" ", 1)
                if len(exc_name) == 1:
                    self.add_message("PEP287-doc-why-raised-missing", node=node,
                                     args=('"{}"'.format(exc_name[0].replace(":", "")),))
                elif not exc_name[0].endswith(":"):
                    self.add_message("PEP287-doc-raised-wrong-syntax", node=node,
                                     args=('"{}"'.format(exc_name[0]),))

        Check if 'raises' is properly documented.

        :param doc:
        :return:
        
Check if 'raises' is properly documented.
Check if ' raises ' is properly documented .
def _check_raises_described(self, node, raised):
        for line in node.doc.strip().split(os.linesep):
            line = line.strip()
            if line.startswith(":raises "):
                exc_name = line.split(" ", 1)[-1].split(" ", 1)
                if len(exc_name) == 1:
                    self.add_message("PEP287-doc-why-raised-missing", node=node,
                                     args=('"{}"'.format(exc_name[0].replace(":", "")),))
                elif not exc_name[0].endswith(":"):
                    self.add_message("PEP287-doc-raised-wrong-syntax", node=node,
                                     args=('"{}"'.format(exc_name[0]),))
def _check_raises_described ( self , node , raised ) : for line in node . doc . strip ( ) . split ( os . linesep ) : line = line . strip ( ) if line . startswith ( ":raises " ) : exc_name = line . split ( " " , 1 ) [ - 1 ] . split ( " " , 1 ) if len ( exc_name ) == 1 : self . add_message ( "PEP287-doc-why-raised-missing" , node = node , args = ( '"{}"' . format ( exc_name [ 0 ] . replace ( ":" , "" ) ) , ) ) elif not exc_name [ 0 ] . endswith ( ":" ) : self . add_message ( "PEP287-doc-raised-wrong-syntax" , node = node , args = ( '"{}"' . format ( exc_name [ 0 ] ) , ) )
Check if 'raises' is properly documented.
Check if ' raises ' is properly documented .
"""
        Check if 'raises' is properly documented.

        :param doc:
        :return:
        """
None
self
node
raised
doc
None