setup.py
def get_long_description():
    """Transform README.md into a usable long description.

    Replaces relative references to svg images to absolute https references.
    """

    with open('README.md') as f:
        read_me = f.read()

    def replace_relative_with_absolute(match):
        svg_path = match.group(0)[1:-1]
        return ('(https://github.com/google/pybadges/raw/master/'
                '%s?sanitize=true)' % svg_path)

    return re.sub(r'\(tests/golden-images/.*?\.svg\)',
                  replace_relative_with_absolute,
                  read_me)
def get_long_description():
    """Transform README.md into a usable long description.

    Replaces relative references to svg images to absolute https references.
    """

    with open('README.md') as f:
        read_me = f.read()

    def replace_relative_with_absolute(match):
        svg_path = match.group(0)[1:-1]
        return ('(https://github.com/google/pybadges/raw/master/'
                '%s?sanitize=true)' % svg_path)

    return re.sub(r'\(tests/golden-images/.*?\.svg\)',
                  replace_relative_with_absolute,
                  read_me)
def get_long_description ( ) : with open ( 'README.md' ) as f : read_me = f . read ( ) def replace_relative_with_absolute ( match ) : svg_path = match . group ( 0 ) [ 1 : - 1 ] return ( '(https://github.com/google/pybadges/raw/master/' '%s?sanitize=true)' % svg_path ) return re . sub ( r'\(tests/golden-images/.*?\.svg\)' , replace_relative_with_absolute , read_me )
Transform README.md into a usable long description.

    Replaces relative references to svg images to absolute https references.
Transform README . md into a usable long description .