parameters: (dist)
return_statement: return dist
docstring: Return a current distribution object for a Requirement or string
docstring_summary: Return a current distribution object for a Requirement or string
docstring_tokens: Return a current distribution object for a Requirement or string
function: def get_distribution(dist):
      """Return a current distribution object for a Requirement or string"""
      if isinstance(dist, six.string_types):
          dist = Requirement.parse(dist)
      if isinstance(dist, Requirement):
          dist = get_provider(dist)
      if not isinstance(dist, Distribution):
          raise TypeError("Expected string, Requirement, or Distribution", dist)
      return dist
function_tokens: def get_distribution ( dist ) : if isinstance ( dist , six . string_types ) : dist = Requirement . parse ( dist ) if isinstance ( dist , Requirement ) : dist = get_provider ( dist ) if not isinstance ( dist , Distribution ) : raise TypeError ( "Expected string, Requirement, or Distribution" , dist ) return dist