(self, code_obj)
Adds properties used to generate better documentation.

    Args:
      code_obj: (CodeObject) The entity to annotate
Adds properties used to generate better documentation.
Adds properties used to generate better documentation .
def AnnotateDocumentation(self, code_obj):
    """Adds properties used to generate better documentation.

    Args:
      code_obj: (CodeObject) The entity to annotate
    """

    description = code_obj.values.get('description')
    if not description:
      return

    # Trailing EOLN should be stripped already.
    if description.endswith('\n'):
      description = description[0:len(description) - 1]

    # Make sure description ends with a period.
    if not description.endswith('.'):
      description += '.'

    # Check for mention about being deprecated.
    if re.match(r'(?:^|\W)deprecated(?:$|\W)', description, re.IGNORECASE):
      code_obj.SetTemplateValue('deprecated', True)

    description = self._DLifyDescription(description)
    code_obj.SetTemplateValue('description', description)
def AnnotateDocumentation ( self , code_obj ) : description = code_obj . values . get ( 'description' ) if not description : return # Trailing EOLN should be stripped already. if description . endswith ( '\n' ) : description = description [ 0 : len ( description ) - 1 ] # Make sure description ends with a period. if not description . endswith ( '.' ) : description += '.' # Check for mention about being deprecated. if re . match ( r'(?:^|\W)deprecated(?:$|\W)' , description , re . IGNORECASE ) : code_obj . SetTemplateValue ( 'deprecated' , True ) description = self . _DLifyDescription ( description ) code_obj . SetTemplateValue ( 'description' , description )