def _next_version(version):
if hasattr(version, '<STR_LIT>'):<EOL><INDENT>if version.base_version:<EOL><INDENT>parts = version.base_version.split('<STR_LIT:.>')<EOL><DEDENT>else:<EOL><INDENT>parts = []<EOL><DEDENT><DEDENT>else:<EOL><INDENT>parts = []<EOL>for part in version:<EOL><INDENT>if part.startswith('<STR_LIT:*>'):<EOL><INDENT>break<EOL><DEDENT>parts.append(part)<EOL><DEDENT><DEDENT>parts = [int(p) for p in parts]<EOL>if len(parts) < <NUM_LIT:3>:<EOL><INDENT>parts += [<NUM_LIT:0>] * (<NUM_LIT:3> - len(parts))<EOL><DEDENT>major, minor, micro = parts[:<NUM_LIT:3>]<EOL>return '<STR_LIT>'.format(major, minor + <NUM_LIT:1>, <NUM_LIT:0>)<EOL>
Given a parsed version from pkg_resources.parse_version, returns a new
version string with the next minor version.

Examples
========
>>> _next_version(pkg_resources.parse_version('1.2.3'))
'1.3.0'