

def versions_from_parentdir(parentdir_prefix, root, verbose):
    dirname = os.path.basename(root)
    if (not dirname.startswith(parentdir_prefix)):
        if root:
            print(("guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" % (root, dirname, parentdir_prefix)))
        raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
    return {
        'version': dirname[len(parentdir_prefix):],
        'full-revisionid': None,
        'dirty': False,
        'error': None,
    }

dataset/ETHPy150Open Anaconda-Platform/chalmers/versioneer.py versions_from_parentdir/VarMisuse@39/49 `verbose`->`root`