parameters: (self, obj)
docstring: Verify an optional "requires" array, when present.
docstring_summary: Verify an optional "requires" array, when present.
docstring_tokens: Verify an optional requires array when present .
function: def validate_requires_section(self, obj):
          """Verify an optional "requires" array, when present."""
          requires = obj.get('requires')
          if not requires:
              return
          if not isinstance(requires, list):
              raise TypeError('"requires" key must be a list of expressions')
          for req in requires:
              if not isinstance(req, str_type):
                  raise TypeError('"requires" entry not a string: %s' % (req))
              comp = version_comparator(req)
              if not comp.parse():
                  raise ValueError('invalid "requires" expression: %s' % (req))
              if comp.label not in self.REQUIRES_LABELS:
                  raise ValueError('%s is not a valid "requires" label' %
                                   (comp.label))
function_tokens: def validate_requires_section ( self , obj ) : requires = obj . get ( 'requires' ) if not requires : return if not isinstance ( requires , list ) : raise TypeError ( '"requires" key must be a list of expressions' ) for req in requires : if not isinstance ( req , str_type ) : raise TypeError ( '"requires" entry not a string: %s' % ( req ) ) comp = version_comparator ( req ) if not comp . parse ( ) : raise ValueError ( 'invalid "requires" expression: %s' % ( req ) ) if comp . label not in self . REQUIRES_LABELS : raise ValueError ( '%s is not a valid "requires" label' % ( comp . label ) )