(dist)
return dist
Return a current distribution object for a Requirement or string
Return a current distribution object for a Requirement or string
Return a current distribution object for a Requirement or string
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
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