(*args)
return metadata['version']
Extract the version number from a Python module.
Extract the version number from a Python module.
Extract the version number from a Python module .
def get_version(*args):
    """Extract the version number from a Python module."""
    contents = get_contents(*args)
    metadata = dict(re.findall('__([a-z]+)__ = [\'"]([^\'"]+)', contents))
    return metadata['version']
def get_version ( * args ) : contents = get_contents ( * args ) metadata = dict ( re . findall ( '__([a-z]+)__ = [\'"]([^\'"]+)' , contents ) ) return metadata [ 'version' ]