(self, errors)
Check if the block has a description and lines are not too long.
Check if the block has a description and lines are not too long.
Check if the block has a description and lines are not too long .
def _validate_description(self, errors):
        """Check if the block has a description and lines are not too long."""
        if self.description is None:
            # There was a error reading description, which has already been recorded.
            return

        if self.description.strip() == '':
            param_name = self.param_prop.var_name
            errors.append(ValidatorError(f"Empty description for {param_name}", self.line, SEVERITY_WARNING))

        for i, line in enumerate(self.description.splitlines()):
            if len(line) > MAX_COMMENT_LENGTH and not line.endswith("#noqa"):
                err_string = f"Description too long [{line[:30]}...] ({len(line)}/{MAX_COMMENT_LENGTH})"
                errors.append(ValidatorError(err_string, self.line + i + 1))
def _validate_description ( self , errors ) : if self . description is None : # There was a error reading description, which has already been recorded. return if self . description . strip ( ) == '' : param_name = self . param_prop . var_name errors . append ( ValidatorError ( f"Empty description for {param_name}" , self . line , SEVERITY_WARNING ) ) for i , line in enumerate ( self . description . splitlines ( ) ) : if len ( line ) > MAX_COMMENT_LENGTH and not line . endswith ( "#noqa" ) : err_string = f"Description too long [{line[:30]}...] ({len(line)}/{MAX_COMMENT_LENGTH})" errors . append ( ValidatorError ( err_string , self . line + i + 1 ) )