def _make_version(major, minor, micro, level, serial):
level_dict = {"<STR_LIT>": "<STR_LIT:a>", "<STR_LIT>": "<STR_LIT:b>", "<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"}<EOL>if level not in level_dict:<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>version = "<STR_LIT>".format(major, minor)<EOL>if micro:<EOL><INDENT>version += "<STR_LIT>".format(micro)<EOL><DEDENT>if level != "<STR_LIT>":<EOL><INDENT>version += "<STR_LIT>".format(level_dict[level], serial)<EOL><DEDENT>return version<EOL>
Generate version string from tuple (almost entirely from coveragepy).