parameters: (self)
return_statement: return Requirement.parse(spec)
docstring: Return a ``Requirement`` that matches this distribution exactly
docstring_summary: Return a ``Requirement`` that matches this distribution exactly
docstring_tokens: Return a Requirement that matches this distribution exactly
function: def as_requirement(self):
          """Return a ``Requirement`` that matches this distribution exactly"""
          if isinstance(self.parsed_version, packaging.version.Version):
              spec = "%s==%s" % (self.project_name, self.parsed_version)
          else:
              spec = "%s===%s" % (self.project_name, self.parsed_version)
  
          return Requirement.parse(spec)
function_tokens: def as_requirement ( self ) : if isinstance ( self . parsed_version , packaging . version . Version ) : spec = "%s==%s" % ( self . project_name , self . parsed_version ) else : spec = "%s===%s" % ( self . project_name , self . parsed_version ) return Requirement . parse ( spec )